human
Complete this python program:
def buildTLSProtocol(server=False, transport=None, fakeConnection=None):
assistant
#Here is the Python program you requested.

    """Create a protocol hooked up to a TLS transport hooked up to a
    StringTransport.
    """
    clientProtocol = AccumulatingProtocol(999999999999)
    clientFactory = ClientFactory()
    clientFactory.protocol = (lambda : clientProtocol)
    if fakeConnection:
        @implementer(IOpenSSLServerConnectionCreator, IOpenSSLClientConnectionCreator)
        class HardCodedConnection(object, ):
            def clientConnectionForTLS(self, tlsProtocol):
                return fakeConnection
            serverConnectionForTLS = clientConnectionForTLS
        contextFactory = HardCodedConnection()
    elif server:
        contextFactory = ServerTLSContext()
    else:
        contextFactory = ClientTLSContext()
    wrapperFactory = TLSMemoryBIOFactory(contextFactory, (not server), clientFactory)
    sslProtocol = wrapperFactory.buildProtocol(None)
    if (transport is None):
        transport = StringTransport()
    sslProtocol.makeConnection(transport)
    return (clientProtocol, sslProtocol)