<｜begin▁of▁sentence｜>### Instruction:
Given a list of integers (e.g., [-5, 6, 4]), use the safemax function from networkx to find the maximum value. If the list is empty, the function should return the default value 0. How can you apply safemax to the following situations: a non-empty list, an empty list, and providing a custom default value for an empty iterable?
### Response:
from networkx.utils import safemax

# Example usage
# Given a list of integers
values = [-5, 6, 4]

# Use safemax to find the maximum value safely
max_value = safemax(values, default=0)
print('The maximum value is:', max_value)

# Given an empty list
empty_values = []

# Use safemax with an empty list and a default value
max_empty = safemax(empty_values, default=0)
print('The maximum value for empty list is:', max_empty)
<|EOT|>
