<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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=cb)