def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()
def queue_when_in_transaction(call):
    if transaction_states[call.using]:
        transaction_states[call.using].push((call, (), {}))
    else:
        return call()