def METHOD_NAME(http_client):
    """
    Periodically flush all data in the HTTP client while this context manager
    is active.
    py:`treq.testing.RequestTraversalAgent` doesn't automatically pass data
    between a client and server, if a response isn't generated synchronously,
    so if we want requests to complete, we need to call ``.flush`` on it.
    :param treq.client.HTTPClient http_client:
        An HTTP Client wrapping a :py:`treq.testing.RequestTraversalAgent`.
    """
    def pump():
        while True:
            http_client._agent.flush()
            yield
    coop = Cooperator()
    task = coop.cooperate(pump())
    try:
        yield
    finally:
        task.stop()
        coop.stop()