def lookupSubsystem(self, name, data):
        """
        If the user requests the TestSubsystem subsystem, connect them to a
        MockProtocol.  If they request neither, then None is returned which is
        interpreted by SSHSession as a failure.
        """
        if name == b'TestSubsystem':
            self.subsystem = MockProtocol()
            self.subsystem.packetData = data
            return self.subsystem

        If the user requests the TestSubsystem subsystem, connect them to a
        MockProtocol.  If they request neither, then None is returned which is
        interpreted by SSHSession as a failure.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_session.py