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 three values.
  assert calculate_metrics([3, 4, 5, 6, 21, 8])==(21, 3, 8.166666666666666)
  assert calculate_metrics([10, 10, 10, 10])==(10, 10, 10.0)
  assert calculate_metrics([0, -1, 100, 23])==(100, -1, 30.5)
  assert calculate_metrics([])==(None, None, None)
output: def calculate_metrics(seq):
      if not seq:
          return None, None, None
      return max(seq), min(seq), sum(seq) / len(seq)