human
I wrote the below code

    def connect_client(listening_port):
        return TCP4ClientEndpoint(reactor, '127.0.0.1', listening_port.getHost().port).connect(client_factory)
    return listen(case, TCP4ServerEndpoint(reactor, 0), server_factory).addCallback(connect_client)

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

def connected_server_and_client(case, server_factory, client_factory):