def openChannel(self, channel, extra=b''):
        """
        Open a new channel on this connection.

        @type channel:  subclass of C{SSHChannel}
        @type extra:    L{bytes}
        """
        log.msg('opening channel %s with %s %s'%(self.localChannelID,
                channel.localWindowSize, channel.localMaxPacket))
        self.transport.sendPacket(MSG_CHANNEL_OPEN, common.NS(channel.name)
                    + struct.pack('>3L', self.localChannelID,
                    channel.localWindowSize, channel.localMaxPacket)
                    + extra)
        channel.id = self.localChannelID
        self.channels[self.localChannelID] = channel
        self.localChannelID += 1

        Open a new channel on this connection.

        @type channel:  subclass of C{SSHChannel}
        @type extra:    L{bytes}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/ssh/connection.py