def _do_close(self):
AMQP_LOGGER.debug('<STR_LIT>', self.channel_id)<EOL>self.is_open = False<EOL>channel_id, self.channel_id = self.channel_id, None<EOL>connection, self.connection = self.connection, None<EOL>if connection:<EOL><INDENT>connection.channels.pop(channel_id, None)<EOL>connection._avail_channel_ids.append(channel_id)<EOL><DEDENT>self.callbacks.clear()<EOL>self.cancel_callbacks.clear()<EOL>self.events.clear()<EOL>self.no_ack_consumers.clear()<EOL>
Tear down this object, after we've agreed to close
        with the server.