def METHOD_NAME(
    session, t, asset_account, revenue_account
):
    s1 = build_split(t, asset_account, 100)
    s2 = build_split(t, revenue_account, -100)
    with session.begin_nested():
        session.add_all([t, s1, s2])
    with session.begin_nested():
        session.delete(t)  # should delete associated splits
    assert session.scalars(select(func.count(Split.id))).one() == 0