input: Write a python function to calculate the median of a list.
  assert calculate_median([3, 5, 2, 8, 6, 5]) == 5
  assert calculate_median([1, 3, 3, 6, 7, 8, 9]) == 6
  assert calculate_median([1, 2, 3, 4, 5]) == 3
  assert calculate_median([10, 20, 30, 40]) == 25
  assert calculate_median([2]) == 2
output: def calculate_median(lst):
      lst.sort()
      n = len(lst)
      mid = n // 2
      
      if n % 2 == 0:
          return (lst[mid - 1] + lst[mid]) / 2
      else:
          return lst[mid]