code: def append(self, item):
      
      if self.should_flush():
        self.flush()
      self.items.append(item)
docs: Add new item to the list.
  
      If needed, append will first flush existing items and clear existing items.
  
      Args:
        item: an item to add to the list.