def _get_free_channel_id(self):
        try:
            return self._avail_channel_ids.pop()
        except IndexError:
            raise ResourceError('No free channel ids, current={0}, channel_max={1}'.format(
                len(self.channels), self.channel_max), spec.Channel.Open)
Get next free channel ID
dataset/ETHPy150Open veegee/amqpy/amqpy/connection.py/Connection._get_free_channel_id