code: def publish_synchronous(self, *args, **kwargs):
          '''
          Helper for publishing a message using transactions.  If 'cb' keyword
          arg is supplied, will be called when the transaction is committed.
          '''
          cb = kwargs.pop('cb', None)
          self.tx.select()
          self.basic.publish(*args, **kwargs)
          self.tx.commit(cb=cbf publish_synchronous(self, *args, **kwargs):
          '''
          Helper for publishing a message using transactions.  If 'cb' keyword
          arg is supplied, will be called when the transaction is committed.
          '''
          cb = kwargs.pop('cb', None)
          self.tx.select()
          self.basic.publish(*args, **kwargs)
          self.tx.commit(cb=cb)
docs: Helper for publishing a message using transactions.  If 'cb' keyword
          arg is supplied, will be called when the transaction is committed.