def packetReceived(self, messageNum, packet):
        """
        called when we receive a packet on the transport
        """
        #print self.protocolMessages
        if messageNum in self.protocolMessages:
            messageType = self.protocolMessages[messageNum]
            f = getattr(self,'ssh_%s' % messageType[4:],
                        None)
            if f is not None:
                return f(packet)
        log.msg("couldn't handle %r" % messageNum)
        log.msg(repr(packet))
        self.transport.sendUnimplemented()

        called when we receive a packet on the transport
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/ssh/service.py