input: Write a function to calculate the maximum, minimum, and average values from a given sequence of numbers. If the given sequence is empty, return None for all three values.
  assert calculate_metrics([3, 4, 5, 6, 21, 8]) == (21, 3, 7.833333333333333)
  assert calculate_metrics([10, -2, 5, 8]) == (10, -2, 5.25)
  assert calculate_metrics([]) == (None, None, None)
  assert calculate_metrics([7]) == (7, 7, 7.0)
output: def calculate_metrics(seq):
      if not seq:
          return None, None, None
      maximum = max(seq)
      minimum = min(seq)
      average = sum(seq) / len(seq)
      return maximum, minimum, average