def flush(self):
    """Flush all information recorded in context."""
    for pool in self._pools.values():
      pool.flush()
    if self.shard_state:
      self.shard_state.put()
Flush all information recorded in context.
mapreduce/context.py