input: Write a python function to implement a MaxHeap class with methods to insert elements, delete the maximum element, and build a heap from a list.
  assert heap.insert(10) == [10]
  assert heap.insert(20) == [20, 10]
  assert heap.delete_max() == 20
  assert heap.build_heap([9, 5, 6, 2, 3]) == [9, 5, 6, 2, 3]
output: class MaxHeap:
      def __init__(self):
          self.heap = []
  
      def insert(self, value):
          self.heap.append(value)
          self._sift_up(len(self.heap) - 1)
          return self.heap
  
      def delete_max(self):
          if len(self.heap) == 0:
              return None
          if len(self.heap) == 1:
              return self.heap.pop()
          max_value = self.heap[0]
          self.heap[0] = self.heap.pop()
          self._sift_down(0)
          return max_value
  
      def build_heap(self, elements):
          self.heap = elements[:]
          for i in range(len(self.heap) // 2 - 1, -1, -1):
              self._sift_down(i)
          return self.heap
  
      def _sift_up(self, idx):
          parent = (idx - 1) // 2
          if idx > 0 and self.heap[idx] > self.heap[parent]:
              self.heap[idx], self.heap[parent] = self.heap[parent], self.heap[idx]
              self._sift_up(parent)
  
      def _sift_down(self, idx):
          largest = idx
          left = 2 * idx + 1
          right = 2 * idx + 2
  
          if left < len(self.heap) and self.heap[left] > self.heap[largest]:
              largest = left
          if right < len(self.heap) and self.heap[right] > self.heap[largest]:
              largest = right
          if largest != idx:
              self.heap[idx], self.heap[largest] = self.heap[largest], self.heap[idx]
              self._sift_down(largest)
  
  heap = MaxHeap()