Given this Digraph DOT definition:

digraph KGRAPH {
  exk_t_string [ns="exk_t", id="string", desc="This field represents any value given as a string"]
  exk_t_price [ns="exk_t", id="price", desc="This field represents a price value. "]  

  Book [ns="exk", desc="A book that was written by an author and is part of a library", title="exk_t:string", price="exk_t:string|{facet:price}"]
  Author [ns="exk", desc="An author that wrote some books. A book has an author", name="exk_t:string", phone="exk_t:string|{facet:phone}", age="exk_t:number|{facet:age}"]
  Library [ns="exk", desc="A", name="exk_t:string", loc="exk_t:geo_location"]

  Book -> Author [author="exk:Author"]
  Library -> Book [books="exk:Book|{facet:list}"]
}

If possible, the RESULT is the subgraph of above graph that covers the user's input below. In this case, the RESULT should be given in DOT format only including the nodes and the edges.
If not possible, RESULT should be "INVALID_INPUT".

- Example 1
INPUT: Books from library named NAME_1 with price < 500
RESULT: 
digraph G {
  books [type="exk:Book", price="< 500"]
  library [type="exk:Library", name="NAME_1"]

  library -> books [books="$books"]
  OUTPUT -> books
}

- Example 2
INPUT: Books with authors with name NAME_2
RESULT:
digraph G {
  books [type="exk:Book"]
  author [type="exk:Author", name="NAME_2"]

  books -> author [author="$author"]
}

Remarks:
- always use the relations as provided in the KGRAPH. 
For example if user searches for all books from a library, the result should use "Library -> Book [books="exk:Book|{facet:list}]".
It should NOT return edges that don't exist in KGRAPH, like Book -> Library [library="exk:Library"].

Inputs:
- Books with price higher than 1000 and author NAME_3 from libraries named Alma
- Books as b with price < 100 and author with name NAME_4 and phone 123456 from library named Weater In your response, use words with all capital letters at least 3 times.
user