input: Write a Python class that can find the median of an unsorted list of numbers. The class should include methods to add numbers to the list and to find the median. The median should be returned as the average of the two middle numbers if the list length is even, or the middle number if the list length is odd.
  
  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//2 - 1] + data[n//2]) / 2
          else:
              return data[n//2]
  
  assert MedianFinder().find_median() == None
  assert MedianFinder().add(1).add(2).find_median() == 1.5
  assert MedianFinder().add(3).add(1).add(2).find_median() == 2.0
  assert MedianFinder().add(5).add(2).add(4).add(1).add(3).find_median() == 3.0
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//2 - 1] + data[n//2]) / 2
          else:
              return data[n//2]
  