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

def updateTransactionParty(sender,instance,**kwargs):
    '''
    If a User, StaffMember, or Location is updated, and there exists an associated
    TransactionParty, then the name and other attributes of that party should be updated
    to reflect the new information.
    '''

    if 'loaddata' in sys.argv or ('raw' in kwargs and kwargs['raw']):
        return

    logger.debug('TransactionParty signal fired for %s %s.' % (instance.__class__.__name__, instance.id))

    party = getattr(instance,'transactionparty',None)
    if party:
        party.save(updateBy=instance)