input: 
  class MedianFinder:
      def __init__(self):
          self._data = []
      
      def add(self, num):
          """Add a number to the list to find the median."""
          self._data.append(num)
      
      def find_median(self):
          """Find and return the median of the list of numbers.
          >>> mf = MedianFinder()
          >>> mf.add(3)
          >>> mf.add(1)
          >>> mf.add(2)
          >>> mf.find_median()
          2.0
          >>> mf.add(4)
          >>> mf.find_median()
          2.5
          """
          data = sorted(self._data)
          n = len(data)
          if n == 0:
              return None
          elif n % 2 == 1:
              return data[n // 2]
          else:
              return (data[(n-1)//2] + data[n//2]) / 2
  
output:     
          data = sorted(self._data)
          n = len(data)
          if n == 0:
              return None
          elif n % 2 == 1:
              return data[n // 2]
          else:
              return (data[(n-1)//2] + data[n//2]) / 2
  