docs: def on_consumer_cancelled(self, _frame):
          """Invoked by pika when a ``Basic.Cancel`` or ``Basic.CancelOk``
          is received.
  
          :param _frame: The Basic.Cancel or Basic.CancelOk frame
          :type _frame: pika.frame.Frame
  
          """
          self.logger.debug('Consumer has been cancelled')
          if self.is_shutting_down:
              self.channel.close()
          else:
              self.set_state(self.STATE_CONNECTED)