input: Write a function to calculate the maximum, minimum, and average values from a given sequence of numbers. The given sequence should be passed as a list of integers. If the sequence is empty, the function should return None for all three values.
  assert calculate_metrics([3, 4, 5, 6, 21, 8])==(21, 3, 8)
  assert calculate_metrics([1, 2, 3])==(3, 1, 2)
  assert calculate_metrics([10, 10, 10])==(10, 10, 10)
  assert calculate_metrics([4])==(4, 4, 4)
  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