human
I wrote the below code

    def pump(source, q, target):
        sent = False
        if q:
            pumpPolicy(q, target)
            sent = True
        if (sent and (not q)):
            source.transport._pollProducer()
        return sent
    while 1:
        disconnect = clientSent = serverSent = False
        serverSent = pump(server, serverToClient, client)
        clientSent = pump(client, clientToServer, server)
        if ((not clientSent) and (not serverSent)):
            d = defer.Deferred()
            clientToServer._notificationDeferred = d
            serverToClient._notificationDeferred = d
            d.addCallback(_loopbackAsyncContinue, server, serverToClient, client, clientToServer, pumpPolicy)
            return d
        if serverToClient.disconnect:
            disconnect = True
            pump(server, serverToClient, client)
        elif clientToServer.disconnect:
            disconnect = True
            pump(client, clientToServer, server)
        if disconnect:
            server.connectionLost(failure.Failure(main.CONNECTION_DONE))
            client.connectionLost(failure.Failure(main.CONNECTION_DONE))
            return defer.succeed(None)

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def _loopbackAsyncBody(server, serverToClient, client, clientToServer, pumpPolicy):