code: def stop_consuming(self):
          
          if self._channel:
              self._logger.info('Sending a Basic.Cancel RPC command to RabbitMQ')
              self._channel.basic_cancel(self.on_cancelok, self._consumer_tag)
docs: Tell RabbitMQ that you would like to stop consuming by sending the
          Basic.Cancel RPC command.