input: Write a function that takes a list of numbers as input and returns the maximum, minimum, and average values of that list. The function should handle cases where the list is empty by returning None for all three values.
  assert calculate_metrics([3, 4, 5, 6, 21, 8])==(21, 3, 7.833333333333333)
  assert calculate_metrics([10])==(10, 10, 10.0)
  assert calculate_metrics([])==(None, None, None)
  assert calculate_metrics([-1, -2, 3, 4, -5])==(4, -5, -0.2)
output: def calculate_metrics(numbers):
      if not numbers:
          return None, None, None
      maximum = max(numbers)
      minimum = min(numbers)
      average = sum(numbers) / len(numbers)
      return maximum, minimum, average