def METHOD_NAME(test_db_engine):
    clear_tables = ["user_repos", "user_groups", "repo", "repo_groups", "users"]
    clear_tables_statement = get_repo_related_delete_statements(clear_tables)
    try:
        with test_db_engine.connect() as connection:
            username = "user"
            user_id = 1
            email = f"{username}@gmail.com"
            query_statements = []
            query_statements.append(clear_tables_statement)
            query_statements.append(get_user_insert_statement(user_id, username, email))
            query = s.text("".join(query_statements))
            connection.execute(query)
        with DatabaseSession(logger, test_db_engine) as session:
            # invalid type
            assert User.get_user(session, 123) is None
            # invalid user
            assert User.get_user(session, "BestUser") is None
            # valid user
            user = User.get_user(session, username)
            assert user.user_id == user_id
            assert user.login_name == username
            assert user.email == email
    finally:
        with test_db_engine.connect() as connection:
            connection.execute(clear_tables_statement)