code: def calculate_median(given_list):
          
          median = None
  
          if not given_list:
              return median
  
          given_list = sorted(given_list)
          list_length = len(given_list)
  
          if list_length % 2:
              median = given_list[int(list_length / 2)]
          else:
              median = (given_list[int(list_length / 2)] + given_list[int(list_length / 2) - 1]) / 2.0
  
          return median
docs: Returns the median of values in the given list.