'Cancel consumer by consumer tag.'

def basic_cancel(self, consumer_tag):

    if (consumer_tag in self._consumers):
        self._consumers.remove(consumer_tag)
        self._reset_cycle()
        queue = self._tag_to_queue.pop(consumer_tag, None)
        try:
            self._active_queues.remove(queue)
        except ValueError:
            pass
        self.connection._callbacks.pop(queue, None)
