human
Here's a good function header given the following:
I wrote the below code

    addr = ('127.0.0.1',)
    clientBroker = clientFactory.buildProtocol(addr)
    serverBroker = serverFactory.buildProtocol(addr)
    clientTransport = StringIO()
    serverTransport = StringIO()
    clientBroker.makeConnection(protocol.FileWrapper(clientTransport))
    serverBroker.makeConnection(protocol.FileWrapper(serverTransport))
    pump = IOPump(clientBroker, serverBroker, clientTransport, serverTransport)
    def maybeDisconnect(broker):
        if (not broker.disconnected):
            broker.connectionLost(failure.Failure(main.CONNECTION_DONE))
    def disconnectClientFactory():
        clientFactory.clientConnectionLost(connector=None, reason=failure.Failure(main.CONNECTION_DONE))
    test.addCleanup(maybeDisconnect, clientBroker)
    test.addCleanup(maybeDisconnect, serverBroker)
    test.addCleanup(disconnectClientFactory)
    pump.pump()
    return (clientBroker, serverBroker, pump)

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

def connectServerAndClient(test, clientFactory, serverFactory):