input: Write a function to calculate the maximum, minimum, and average values from a given sequence of numbers. If the sequence is empty, return None for all metrics.
  assert calculate_metrics([3, 4, 5, 6, 21, 8])==(21, 3, 8.166666666666666)
  assert calculate_metrics([-5, 5, 15, 25])==(25, -5, 10.0)
  assert calculate_metrics([0])==(0, 0, 0.0)
  assert calculate_metrics([])==(None, None, None)
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