input: 
  class MedianFinder:
      """A class to find the median of an unsorted list of numbers.
      The class supports adding numbers to the list and finding the median.
      Example:
      mf = MedianFinder()
      mf.add(1)
      mf.add(3)
      mf.add(2)
      assert mf.find_median() == 2.0
      """
      def __init__(self):
          self._data = []
      
      def add(self, num):
          self._data.append(num)
      
      def find_median(self):
          data = sorted(self._data)
          n = len(data)
          return (data[(n-1)//2] + data[n//2])/2
  
output:     
      def __init__(self):
          self._data = []
          self._min_heap = []
          self._max_heap = []
      
      def add(self, num):
          if len(self._max_heap) == 0 or num <= -self._max_heap[0]:
              heapq.heappush(self._max_heap, -num)
          else:
              heapq.heappush(self._min_heap, num)
          
          if len(self._max_heap) > len(self._min_heap) + 1:
              heapq.heappush(self._min_heap, -heapq.heappop(self._max_heap))
          elif len(self._min_heap) > len(self._max_heap):
              heapq.heappush(self._max_heap, -heapq.heappop(self._min_heap))
      
      def find_median(self):
          if len(self._max_heap) == len(self._min_heap):
              return (-self._max_heap[0] + self._min_heap[0]) / 2
          else:
              return -self._max_heap[0]
  