def METHOD_NAME(session, t, asset_account, revenue_account):
    s1 = build_split(t, asset_account, 100)
    s2 = build_split(t, revenue_account, -100)
    try:
        with session.begin_nested():
            session.add_all([s1, s2])
    except IllegalTransactionError:
        pytest.fail("Threw illegalterror")