def _getWrapper(self):
        """
        Return L{policies.ProtocolWrapper} that has been connected to a
        L{StringTransport}.
        """
        wrapper = policies.ProtocolWrapper(policies.WrappingFactory(Server()),
                                           protocol.Protocol())
        transport = StringTransport()
        wrapper.makeConnection(transport)
        return wrapper

        Return L{policies.ProtocolWrapper} that has been connected to a
        L{StringTransport}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_policies.py