def loseConnection(self):
        """
        Disconnect the protocol associated with this transport.
        """
        if self.closed:
            return
        self.closed = 1
        self.proto.inConnectionLost()
        self.proto.outConnectionLost()
        self.proto.errConnectionLost()
        self.proto.processEnded(failure.Failure(ProcessTerminated(255, None, None)))

        Disconnect the protocol associated with this transport.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_ssh.py