def __init__(self, connection, channel_id=None, auto_decode=True):
        if channel_id:
            # noinspection PyProtectedMember
            connection._claim_channel_id(channel_id)
        else:
            # noinspection PyProtectedMember
            channel_id = connection._get_free_channel_id()

        super(Channel, self).__init__(connection, channel_id)

        # auto decode received messages
        self.auto_decode = auto_decode

        ### channel state variables:

        #: Current channel open/closed state
        #:
        #: :type: bool
        self.is_open = False

        #: Current channel active state (flow control)
        #:
        #: :type: bool
        self.active = True

        #: Channel mode state (default, transactional, publisher confirm)
        #:
        #: :type: int
        self.mode = 0

        #: Returned messages that the server was unable to deliver
        #:
        #: :type: queue.Queue
        self.returned_messages = Queue()

        # consumer callbacks dict[consumer_tag str: callable]
        self.callbacks = {}

        # consumer cancel callbacks dict dict[consumer_tag str: callable]
        self.cancel_callbacks = {}

        # set of consumers that have opted for `no_ack` delivery (server will not expect an ack
        # for delivered messages)
        self.no_ack_consumers = set()

        # open the channel
        self._open()
Create a channel bound to a connection and using the specified numeric channel_id, and
dataset/ETHPy150Open veegee/amqpy/amqpy/channel.py/Channel.__init__