# tests/cypher/corpus/library.jsonl, method get_incoming_model_instances
query: "MATCH (a:ModelInstance {uid: $uid}) MATCH (o:ModelInstance)-[r*1..3]->(a) RETURN DISTINCT o AS mi, type(r[-1]) AS via_rel, 'in' AS direction ORDER BY via_rel, mi.uid LIMIT 2"
---
Match optional=False
  Path var=None selector=None
    Node var=a labels=(ModelInstance) props={uid: (Param uid)} where=None
  where=None
Match optional=False
  Path var=None selector=None
    Node var=o labels=(ModelInstance) props={} where=None
    Quantified min=1 max=3
      Node var=__a0 labels=* props={} where=None
      Rel var=r types=* dir=out props={} where=None
      Node var=__a1 labels=* props={} where=None
    Node var=a labels=* props={} where=None
  where=None
Return distinct=True order=((Var via_rel) ASC, (Prop (Var mi) uid) ASC) skip=None limit=(Lit 2)
  mi = (Var o)
  via_rel = (Func type (Index (Var r) (Lit -1)))
  direction = (Lit "in")
