'Register an arbitrary pool to be flushed together with this context.
Args:
key: pool key as string.
pool: a pool instance. Pool should implement flush(self) method.'

def register_pool(self, key, pool):

    self._pools[key] = pool
