def client(self, reactor, serverAddress):
        """
        Construct a TCP client endpoint wrapped to immediately start TLS.
        """
        return StartTLSClientEndpoint(
            TCP4ClientEndpoint(
                reactor, '127.0.0.1', serverAddress.port),
            ClientContextFactory())

        Construct a TCP client endpoint wrapped to immediately start TLS.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_tls.py