'Will invoke a clean shutdown of the channel with the AMQP Broker.
:param int reply_code: The reply code to close the channel with
:param str reply_text: The reply text to close the channel with'

def close(self, reply_code=0, reply_text='Normal    shutdown'):

    LOGGER.debug('Channel.close(%s,    %s)', reply_code, reply_text)
    self._cancel_all_consumers()
    try:
        with _CallbackResult() as close_ok_result:
            self._impl.add_callback(callback=close_ok_result.signal_once, replies=[pika.spec.Channel.CloseOk], one_shot=True)
            self._impl.close(reply_code=reply_code, reply_text=reply_text)
            self._flush_output(close_ok_result.is_ready)
    finally:
        self._cleanup()
