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