def getChannel(self, channelType, windowSize, maxPacket, data):
        """
        The other side requested a channel of some sort.
        channelType is the type of channel being requested,
        windowSize is the initial size of the remote window,
        maxPacket is the largest packet we should send,
        data is any other packet data (often nothing).

        We return a subclass of L{SSHChannel}.

        By default, this dispatches to a method 'channel_channelType' with any
        non-alphanumerics in the channelType replace with _'s.  If it cannot
        find a suitable method, it returns an OPEN_UNKNOWN_CHANNEL_TYPE error.
        The method is called with arguments of windowSize, maxPacket, data.

        @type channelType:  L{bytes}
        @type windowSize:   L{int}
        @type maxPacket:    L{int}
        @type data:         L{bytes}
        @rtype:             subclass of L{SSHChannel}/L{tuple}
        """
        log.msg('got channel %r request' % (channelType))
        if hasattr(self.transport, "avatar"): # this is a server!
            chan = self.transport.avatar.lookupChannel(channelType,
                                                       windowSize,
                                                       maxPacket,
                                                       data)
        else:
            channelType = channelType.translate(TRANSLATE_TABLE)
            attr = 'channel_%s' % nativeString(channelType)
            f = getattr(self, attr, None)
            if f is not None:
                chan = f(windowSize, maxPacket, data)
            else:
                chan = None
        if chan is None:
            raise error.ConchError('unknown channel',
                    OPEN_UNKNOWN_CHANNEL_TYPE)
        else:
            chan.conn = self
            return chan

        The other side requested a channel of some sort.
        channelType is the type of channel being requested,
        windowSize is the initial size of the remote window,
        maxPacket is the largest packet we should send,
        data is any other packet data (often nothing).

        We return a subclass of L{SSHChannel}.

        By default, this dispatches to a method 'channel_channelType' with any
        non-alphanumerics in the channelType replace with _'s.  If it cannot
        find a suitable method, it returns an OPEN_UNKNOWN_CHANNEL_TYPE error.
        The method is called with arguments of windowSize, maxPacket, data.

        @type channelType:  L{bytes}
        @type windowSize:   L{int}
        @type maxPacket:    L{int}
        @type data:         L{bytes}
        @rtype:             subclass of L{SSHChannel}/L{tuple}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/ssh/connection.py