code: def publish(self, *args, **kwargs):
          '''
          Publish a message. Will return the id of the message if publisher
          confirmations are enabled, else will return 0.
          '''
          if self.channel.confirm._enabled:
              self._msg_id += 1
          super(RabbitBasicClass, self).publish(*args, **kwargs)
          return self._msg_if publish(self, *args, **kwargs):
          '''
          Publish a message. Will return the id of the message if publisher
          confirmations are enabled, else will return 0.
          '''
          if self.channel.confirm._enabled:
              self._msg_id += 1
          super(RabbitBasicClass, self).publish(*args, **kwargs)
          return self._msg_id
docs: Publish a message. Will return the id of the message if publisher
          confirmations are enabled, else will return 0.