code: def close(self, reply_code=200, reply_text=''):
          
          if not compatibility.is_integer(reply_code):
              raise AMQPInvalidArgument('reply_code should be an integer')
          elif not compatibility.is_string(reply_text):
              raise AMQPInvalidArgument('reply_text should be a string')
          try:
              if self._connection.is_closed or self.is_closed:
                  self.stop_consuming()
                  LOGGER.debug('Channel #%d forcefully Closed', self.channel_id)
                  return
              self.set_state(self.CLOSING)
              LOGGER.debug('Channel #%d Closing', self.channel_id)
              try:
                  self.stop_consuming()
              except AMQPChannelError:
                  self.remove_consumer_tag()
              self.rpc_request(specification.Channel.Close(
                  reply_code=reply_code,
                  reply_text=reply_text),
                  connection_adapter=self._connection
              )
          finally:
              if self._inbound:
                  del self._inbound[:]
              self.set_state(self.CLOSED)
              if self._on_close_impl:
                  self._on_close_impl(self.channel_id)
          LOGGER.debug('Channel #%d Closed', self.channel_id)
docs: Close Channel.
  
          :param int reply_code: Close reply code (e.g. 200)
          :param str reply_text: Close reply text
  
          :raises AMQPInvalidArgument: Invalid Parameters
          :raises AMQPChannelError: Raises if the channel encountered an error.
          :raises AMQPConnectionError: Raises if the connection
                                       encountered an error.
  
          :return: