human
I wrote the below code

    def sync(txn, *args, **kwargs):
        txn._lock.acquire()
        try:
            Check((txn._state is LiveTxn.ACTIVE), 'transaction    closed')
            return function(txn, *args, **kwargs)
        finally:
            txn._lock.release()
    return sync

What's a good function header?
assistant
#Here's a good function header.

def _SynchronizeTxn(function):