def channel(self, callback=None):
        """get a Channel instance"""
        if self.status == status.OPENED:
            ch_id = self._get_next_channel_id()
            ch = Channel(channel_id=ch_id, conn=self)
            self.channels[ch_id] = ch
            ch._open(callback)
            return ch
        else:
            raise AmqpStatusError('connection is not opened')
dataset/ETHPy150Open paolo-losi/stormed-amqp/stormed/connection.py/Connection.channel/original