input: Write a python function to calculate the median of a list of numbers.
  assert calculate_median([1, 3, 5, 7]) == 4.0
  assert calculate_median([1, 3, 5, 7, 9]) == 5
  assert calculate_median([2, 2, 2, 2]) == 2.0
output: def calculate_median(numbers):
      numbers.sort()
      n = len(numbers)
      mid = n // 2
  
      if n % 2 == 0:
          return (numbers[mid - 1] + numbers[mid]) / 2
      else:
          return numbers[mid]