code: def flush(self):
          
          items = []
  
          for data in self._to_put:
              items.append(encode_put(self.connection.dynamizer, data))
  
          for data in self._to_delete:
              items.append(encode_delete(self.connection.dynamizer, data))
          self._write(items)
          self._to_put = []
          self._to_delete = []
docs: Flush pending items to Dynamo