def METHOD_NAME(foo_model: Model, graph_db: GraphDB) -> None:
    query = "is(foo) with(empty, -->) limit 2"
    query_str, _ = to_query(graph_db, QueryModel(parse_query(query), foo_model))
    # make sure, there is no limit in the filter statement
    assert "LET filter0 = (FOR m0 in `ns` FILTER @b0 IN m0.kinds  RETURN m0)" in query_str
    # make sure the limit is applied to the with statement
    assert "FILTER counter1==1  LIMIT 0, 2 RETURN l0_l0_res" in query_str