code: def stop(self):
          
          if not self._providers_registered:
              self.queue_consumer.unregister_provider(self)
              self._unregistered_from_queue_consumer.send(True)
docs: Stop the RpcConsumer.
  
          The RpcConsumer ordinary unregisters from the QueueConsumer when the
          last Rpc subclass unregisters from it. If no providers were registered,
          we should unregister from the QueueConsumer as soon as we're asked
          to stop.