input: Write a class named MedianFinder that can find the median of an unsorted list of numbers. Implement an add method to add numbers to the list and a find_median method to return the median of the current list of numbers. If the list has an even number of elements, the median should be the average of the two middle elements.
  
  class MedianFinder:
   def __init__(self):
       self._data = []
   
   def add(self, num):
       self._data.append(num)
   
   def find_median(self):
       data = sorted(self._data)
       n = len(data)
       if n % 2 == 0:
           return (data[(n-1)//2] + data[n//2]) / 2
       else:
           return data[n//2]
  
  assert MedianFinder().find_median() == None
  assert MedianFinder().add(3).add(2).add(5).find_median() == 3
  assert MedianFinder().add(3).add(2).add(5).add(7).find_median() == 4.0
  assert MedianFinder().add(3).add(2).add(5).add(1).find_median() == 2.5
  assert MedianFinder().add(3).find_median() == 3
output: class MedianFinder:
   def __init__(self):
       self._data = []
   
   def add(self, num):
       self._data.append(num)
       return self
   
   def find_median(self):
       if not self._data:
           return None
       data = sorted(self._data)
       n = len(data)
       if n % 2 == 0:
           return (data[(n-1)//2] + data[n//2]) / 2
       else:
           return data[n//2]