code: def flush(self):
      
      if not self.items:
        return
  
      retry = 0
      options = {"deadline": DATASTORE_DEADLINE}
      while retry <= self.__timeout_retries:
        try:
          self.__flush_function(self.items, options)
          self.clear()
          break
        except db.Timeout, e:
          logging.warning(e)
          logging.warning("Flushing '%s' timed out. Will retry for the %s time.",
                          self, retry)
          retry += 1
          options["deadline"] *= 2
        except apiproxy_errors.RequestTooLargeError:
          self._log_largest_items()
          raise
      else:
        raise
docs: Force a flush.