def METHOD_NAME(self, data):
    # We can only safely be sure what the next protocol is when we know
    # the TLS handshake is over. This is generally *not* in the call to
    # connectionMade, but instead only when we've received some data
    # back.
    print(f"Next protocol is: {self.transport.negotiatedProtocol}")
    self.transport.loseConnection()
    # If this is the first data write, we can tell the reactor we're
    # done here by firing the callback we gave it.
    if self.complete is not None:
        self.complete.callback(None)
        self.complete = None