def METHOD_NAME(session: Session):
    state = session_repository.app_state
    root_transaction = state.get_transaction(session)
    assert isinstance(root_transaction, RepositoryTransaction)
    assert root_transaction._parent is None
    # create sub-transaction (db savepoint)
    session.begin(nested=True)
    transaction = state.get_transaction(session)
    assert isinstance(transaction, RepositoryTransaction)
    assert transaction._parent is root_transaction
    session.flush()
    transaction = state.get_transaction(session)
    # FIXME
    # assert transaction is root_transaction
    #
    # # create subtransaction (sqlalchemy)
    # session.begin(subtransactions=True)
    # transaction = state.get_transaction(session)
    # assert isinstance(transaction, RepositoryTransaction)
    # assert transaction._parent is root_transaction
    #
    # session.flush()
    # transaction = state.get_transaction(session)
    # assert transaction is root_transaction