input: Write a function named `calculate_metrics` that takes a list of numbers as input and returns the maximum, minimum, and average values of the list. If the list is empty, it should return `None` for all three values.
  assert calculate_metrics([3, 4, 5, 6, 21, 8]) == (21, 3, 8.166666666666666)
  assert calculate_metrics([]) == (None, None, None)
  assert calculate_metrics([10, 10, 10]) == (10, 10, 10.0)
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