K idZddlZddlmZddlZddlmZgdZedd dd Z edd dd Z dd Z eddejdd e ed fdZejdd e ed fdZGddZGddeZGddZGddeZe ZGddeZy)aH ******* GraphML ******* Read and write graphs in GraphML format. .. warning:: This parser uses the standard xml library present in Python, which is insecure - see :external+python:mod:`xml` for additional information. Only parse GraphML files you trust. This implementation does not support mixed graphs (directed and unidirected edges together), hyperedges, nested graphs, or ports. "GraphML is a comprehensive and easy-to-use file format for graphs. It consists of a language core to describe the structural properties of a graph and a flexible extension mechanism to add application-specific data. Its main features include support of * directed, undirected, and mixed graphs, * hypergraphs, * hierarchical graphs, * graphical representations, * references to external data, * application-specific attribute data, and * light-weight parsers. Unlike many other file formats for graphs, GraphML does not use a custom syntax. Instead, it is based on XML and hence ideally suited as a common denominator for all kinds of services generating, archiving, or processing graphs." http://graphml.graphdrawing.org/ Format ------ GraphML is an XML format. See http://graphml.graphdrawing.org/specification.html for the specification and http://graphml.graphdrawing.org/primer/graphml-primer.html for examples. N) defaultdict) open_file) write_graphml read_graphmlgenerate_graphmlwrite_graphml_xmlwrite_graphml_lxml parse_graphml GraphMLWriter GraphMLReaderwb)modeTFcht|||||}|j||j|y)aWrite G in GraphML XML format to path Parameters ---------- G : graph A networkx graph path : file or string File or filename to write. Filenames ending in .gz or .bz2 will be compressed. encoding : string (optional) Encoding for text data. prettyprint : bool (optional) If True use line breaks and indenting in output XML. infer_numeric_types : boolean Determine if numeric types should be generalized. For example, if edges have both int and float 'weight' attributes, we infer in GraphML that both are floats. named_key_ids : bool (optional) If True use attr.name as value for key elements' id attribute. edge_id_from_attribute : dict key (optional) If provided, the graphml edge id is set by looking up the corresponding edge data attribute keyed by this parameter. If `None` or the key does not exist in edge data, the edge id is set by the edge key if `G` is a MultiGraph, else the edge id is left unset. Examples -------- >>> G = nx.path_graph(4) >>> nx.write_graphml(G, "test.graphml") Notes ----- This implementation does not support mixed graphs (directed and unidirected edges together) hyperedges, nested graphs, or ports. )encoding prettyprintinfer_numeric_types named_key_idsedge_id_from_attributeN)r add_graph_elementdump)Gpathrrrrrwriters `/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/networkx/readwrite/graphml.pyrr>s:X/#5 F Q KKc  ddlm}t |||||||}|j y#t$rt|||||||cYSwxYw)aWrite G in GraphML XML format to path This function uses the LXML framework and should be faster than the version using the xml library. Parameters ---------- G : graph A networkx graph path : file or string File or filename to write. Filenames ending in .gz or .bz2 will be compressed. encoding : string (optional) Encoding for text data. prettyprint : bool (optional) If True use line breaks and indenting in output XML. infer_numeric_types : boolean Determine if numeric types should be generalized. For example, if edges have both int and float 'weight' attributes, we infer in GraphML that both are floats. named_key_ids : bool (optional) If True use attr.name as value for key elements' id attribute. edge_id_from_attribute : dict key (optional) If provided, the graphml edge id is set by looking up the corresponding edge data attribute keyed by this parameter. If `None` or the key does not exist in edge data, the edge id is set by the edge key if `G` is a MultiGraph, else the edge id is left unset. Examples -------- >>> G = nx.path_graph(4) >>> nx.write_graphml_lxml(G, "fourpath.graphml") Notes ----- This implementation does not support mixed graphs (directed and unidirected edges together) hyperedges, nested graphs, or ports. rN)graphrrrrr) lxml.etreeetree ImportErrorrGraphMLWriterLxmlr) rrrrrrr lxmletreers rr r usj^  & /#5F KKM)         "    s+AAc#Kt||||}|j|t|jEd{y7w)aBGenerate GraphML lines for G Parameters ---------- G : graph A networkx graph encoding : string (optional) Encoding for text data. prettyprint : bool (optional) If True use line breaks and indenting in output XML. named_key_ids : bool (optional) If True use attr.name as value for key elements' id attribute. edge_id_from_attribute : dict key (optional) If provided, the graphml edge id is set by looking up the corresponding edge data attribute keyed by this parameter. If `None` or the key does not exist in edge data, the edge id is set by the edge key if `G` is a MultiGraph, else the edge id is left unset. Examples -------- >>> G = nx.path_graph(4) >>> linefeed = chr(10) # linefeed = >>> s = linefeed.join(nx.generate_graphml(G)) >>> for line in nx.generate_graphml(G): # doctest: +SKIP ... print(line) Notes ----- This implementation does not support mixed graphs (directed and unidirected edges together) hyperedges, nested graphs, or ports. )rrrrN)r rstr splitlines)rrrrrrs rrrsEJ#5 F  Q6{%%'''s=AAArb)graphs returns_graphc:t|||}t||}t|dk(rjd}|jd|j }|j d|}t||}t|dk(rt jd|dS)aRead graph in GraphML format from path. Parameters ---------- path : file or string Filename or file handle to read. Filenames ending in .gz or .bz2 will be decompressed. node_type: Python type (default: str) Convert node ids to this type edge_key_type: Python type (default: int) Convert graphml edge ids to this type. Multigraphs use id as edge key. Non-multigraphs add to edge attribute dict with name "id". force_multigraph : bool (default: False) If True, return a multigraph with edge keys. If False (the default) return a multigraph when multiedges are in the graph. Returns ------- graph: NetworkX graph If parallel edges are present or `force_multigraph=True` then a MultiGraph or MultiDiGraph is returned. Otherwise a Graph/DiGraph. The returned graph is directed if the file indicates it should be. Notes ----- Default node and edge attributes are not propagated to each node and edge. They can be obtained from `G.graph` and applied to node and edge attributes if desired using something like this: >>> default_color = G.graph["node_default"]["color"] # doctest: +SKIP >>> for node, data in G.nodes(data=True): # doctest: +SKIP ... if "color" not in data: ... data["color"] = default_color >>> default_color = G.graph["edge_default"]["color"] # doctest: +SKIP >>> for u, v, data in G.edges(data=True): # doctest: +SKIP ... if "color" not in data: ... data["color"] = default_color This implementation does not support mixed graphs (directed and unidirected edges together), hypergraphs, nested graphs, or ports. For multigraphs the GraphML edge "id" will be used as the edge key. If not specified then they "key" attribute will be used. If there is no "key" attribute a default NetworkX multigraph edge key will be provided. Files with the yEd "yfiles" extension can be read. The type of the node's shape is preserved in the `shape_type` node attribute. yEd compressed files ("file.graphmlz" extension) can be read by renaming the file to "file.graphml.gz". )rrs7s string%file not successfully read as graphml)r listlenseekreadreplacenx NetworkXError) r node_type edge_key_typeforce_multigraphreaderglistheader old_bytes new_bytess rrrsv9m5E FF T" #E 5zQK ! IIK %%lF; V9-. u:?""#JK K 8Orct|||}t||}t|dk(rId}|jd|}t||}t|dk(rt j d|dS)aRead graph in GraphML format from string. Parameters ---------- graphml_string : string String containing graphml information (e.g., contents of a graphml file). node_type: Python type (default: str) Convert node ids to this type edge_key_type: Python type (default: int) Convert graphml edge ids to this type. Multigraphs use id as edge key. Non-multigraphs add to edge attribute dict with name "id". force_multigraph : bool (default: False) If True, return a multigraph with edge keys. If False (the default) return a multigraph when multiedges are in the graph. Returns ------- graph: NetworkX graph If no parallel edges are found a Graph or DiGraph is returned. Otherwise a MultiGraph or MultiDiGraph is returned. Examples -------- >>> G = nx.path_graph(4) >>> linefeed = chr(10) # linefeed = >>> s = linefeed.join(nx.generate_graphml(G)) >>> H = nx.parse_graphml(s) Notes ----- Default node and edge attributes are not propagated to each node and edge. They can be obtained from `G.graph` and applied to node and edge attributes if desired using something like this: >>> default_color = G.graph["node_default"]["color"] # doctest: +SKIP >>> for node, data in G.nodes(data=True): # doctest: +SKIP ... if "color" not in data: ... data["color"] = default_color >>> default_color = G.graph["edge_default"]["color"] # doctest: +SKIP >>> for u, v, data in G.edges(data=True): # doctest: +SKIP ... if "color" not in data: ... data["color"] = default_color This implementation does not support mixed graphs (directed and unidirected edges together), hypergraphs, nested graphs, or ports. For multigraphs the GraphML edge "id" will be used as the edge key. If not specified then they "key" attribute will be used. If there is no "key" attribute a default NetworkX multigraph edge key will be provided. r+rz7z r-)r r.r/r2r3r4)graphml_stringr5r6r7r8r9r: new_strings rr r 6szz9m5E FF ~. /E 5zQJ#++K@ V:./ u:?""#JK K 8Orc\eZdZdZdZdZdj ddgZdZddddddd Z d Z y ) GraphMLz%http://graphml.graphdrawing.org/xmlnsz)http://www.w3.org/2001/XMLSchema-instancez!http://www.yworks.com/xml/graphml z5http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsdcntdftdftdftdftdftdftdftdfg} d dl}|j df|j df|jdf|jdf|jdf|jdf|jdf|jdf|jdf|jdf|jdf|j df|jdf|j"df|j$dfg|z}t'||_t'd |D|_y#Y,xYw) Nintegeryfilesr,intlongfloatdoublebooleanrc32K|]}t|ywN)reversed).0as r z*GraphML.construct_types..s; ;s)rFr%rHboolnumpyfloat64float32float16int_int8int16int32int64uint8uint16uint32uint64intcintpdictxml_type python_type)selftypesnps rconstruct_typeszGraphML.construct_typess> )  (O (O %L &M G  H  9      W%W%W%% % 5!5!5!5!E"E"E"% % %  !E$U  ;U;;/  s D00D4TF)truefalse0r1r cd |j|S#t$r}td|d|d}~wwxYw)zWrapper around the xml_type dict that raises a more informative exception message when a user attempts to use data of a type not supported by GraphML.zGraphML does not support type  as data values.N)rbKeyError TypeError)rdkeyerrs r get_xml_typezGraphML.get_xml_typesC ==% % 05EF  s /*/N) __name__ __module__ __qualname__ NS_GRAPHMLNS_XSINS_YjoinSCHEMALOCATIONrg convert_boolrrrrrArAsP8J 8F .DXX 3 C N&<\     L rrAcfeZdZ ddZdZdZdZddZdZdZ d Z d Z d Z d Z dd Zy)r Nc||jddlm}||_||_||_||_||_||_|jd|j|j|jd|_ i|_ tt|_tt"|_||j'|yy)Nr)Elementgraphmlxmlnsz xmlns:xsizxsi:schemaLocation)rgxml.etree.ElementTreer myElementrrrrrrvrwrzxmlkeysrr. attributessetattribute_typesr)rdrrrrrrrs r__init__zGraphMLWriter.__init__s 1 #6 &*&<#  >> ![[&*&9&9   %d+*3/    " "5 ) rcddlm}|jr|j|j||jj |j }|S)Nr)tostring)rrrindentrdecoder)rdrss r__str__zGraphMLWriter.__str__s@2    KK ! TXX  % %dmm 4rc |jri|j||f}t|dkDr<|Dchc]}|j|}}d|vrtSd|vsd|vrt St St|dSt|Scc}w)aInfer the attribute type of data named name. Currently this only supports inference of numeric types. If self.infer_numeric_types is false, type is used. Otherwise, pick the most general of types found across all values with name and scope. This means edges with data named 'weight' are treated separately from nodes with data named 'weight'. r r,rHrIr) rrr/rrr%rHrFr.type)rdnamescopevaluerets r attr_typezGraphMLWriter.attr_types  # #(($7E5zA~7<=!**1-==u$J%U): LJE{1~%; >sBc|||f} |j|S#t$r|jr|}n!dtt |j}||j|<||||d}|j di|}|2|j d} t || _|j| |jjd|Y|SwxYw)Nd)idfor attr.name attr.typedefaultrrp) rrnrr/r.rr%textappendrinsert) rdrrrrkeys_keynew_id key_kwargs key_elementdefault_elements rget_keyzGraphMLWriter.get_keys)U+ ,99X& & ,!!Sdii123"(DIIh !& J )$..=*=K""&..";'*7|$""?3 HHOOA{ + ) ,sB1C  C c||jvrtjd|d|j||j |||}|j d|}t ||_|S)zn Make a data element for an edge or a node. Keep a log of the type in the keys table. z GraphML writer does not support rmdatar)rbr3r4rrrrr%r)rdr element_typerrrkeyid data_elements radd_datazGraphMLWriter.add_data-su t}} ,""2<.@PQ  T4#4#4\#BE7S~~f%~8 J rc |jD]h\}}|jt||fjt ||j |j ||||j|gjy)zAppends attribute data to edges or nodes, and stores type information to be added later. See add_graph_element. N)itemsrr%addrrrget)rdrxml_objrrkvs radd_attributeszGraphMLWriter.add_attributes;slJJL KDAq  #a&% 1 5 5d1g > OOG $ + +Q5'++a.,I J Krc|jjdi}|jdD]F\}}|jdt |}|j d||||j |Hy)N node_defaultTrnode)r)rrnodesrr%rr)rdr graph_elementrrr node_elements r add_nodeszGraphMLWriter.add_nodesCsl''++nb1''t', /JD$>>&SY>?L    dG D   . /rc |jr|jddD]\}}}}|jdt|t||jr2|j|vr$t|j |jn t|}|j j di}|jd||||j|y|jdD]\}}}|jrX|j|vrJ|jdt|t|t|j |j}n&|jdt|t|}|j j di}|jd||||j|y)NT)rredge)sourcetargetr edge_defaultr)rr) is_multigraphedgesrr%rrrrr) rdrrurrpr edge_elementrs r add_edgeszGraphMLWriter.add_edgesJs ?? #$7747#@ 31c4#~~q6q62233t;488D$?$?@AS .  ''++nb9##FL$H$$\2 3 gg4g0 3 1d..43N3NRV3V#'>>"1v"1vtxx(C(CDE $2$L$(>>&QPSTUPV>#WL''++nb9##FL$H$$\2 3rc |jrd}nd}|jjdd}||jd|}n|jd||}i}|jj Dcic] \}}|dvr||}}}|j d||||j |||j|||jj D]X\} }|D]N\}}} }| j|jt||j|| |t|| |PZ|jj|ycc}}w) = Serialize graph G in GraphML to the stream. directed undirectedrNr edgedefaultrrrr) is_directedrpoprrrrrrrrr%rr) rdrdefault_edge_typegraphidrrrrrrrs rrzGraphMLWriter.add_graph_elementjs\ ==? *  , ''++dD) ? NN7@QNRM NN%67+M''--/ A88 qD  G]D'B q-( q-( "__224 MGT(, $1eWMMAq% ;SVUG    &) s;Ec4|D]}|j|y)z)Add many graphs to this GraphML document.N)r)rd graph_listrs r add_graphszGraphMLWriter.add_graphss &A  " "1 % &rcddlm}|jr|j|j||j}|j ||j dy)Nr) ElementTreeT)rxml_declaration)rrrrrwriter)rdstreamrdocuments rrzGraphMLWriter.dumpsB5    KK !txx(v tLrcd|dzz}t|r|jr|jjs |dz|_|jr|jjs||_|D]}|j ||dz|jr|jjs||_yy|r/|jr|jjs||_yyy)N z r )r/rstriptailr)rdelemlevelis rrzGraphMLWriter.indents 54<  t999DIIOO$5H 99DIIOO$5  - D%!), -99DIIOO$5 %6diityy/@ 0AurNutf-8TFFN)allN)r)rsrtrurrrrrrrrrrrrr|rrr r sW!# *D24 K/3@%'N& Mrr ceZdZdZdZdZy)IncrementalElementzWrapper for _IncrementalWriter providing an Element like interface. This wrapper does not intend to be a complete implementation but rather to deal with those calls used in GraphMLWriter. c ||_||_yrL)rr)rdrrs rrzIncrementalElement.__init__s&rcR|jj||jy)N pretty_print)rrr)rdelements rrzIncrementalElement.appends wT-=-=>rN)rsrtru__doc__rrr|rrrrs '?rrc:eZdZ ddZdZdZdZddZy) r"Nc|jddlm}|j|_||_||_||_||_||_ |j|||_ |jj|_ |jjg|_|j|_|jj#d|j$|j&|j(d|_|j*ji|_t/t0|_||j5|yy)Nr)rrr)rgrr rr _encoding _prettyprintrrrxmlfile _xml_base __enter___xmlwrite_declarationr_keysrrvrwrz_graphmlrrrrr) rdrrrrrrrr#s rrzGraphMLWriterLxml.__init__s  &"**!'*&<##6 "**4(*CNN,,.  ##% XX  )) ![[&*&9&9    ! *3/    " "5 ) rc  |jrd}nd}|jjdd}||jj d|}n|jj d||}|jj Dcic] \}}|dvr||}}}|jj d i}|jj d i} |j D]7\}}|jt|dfjt|9|j D]D\}}|j|j|d|} |jt|| ddF|jd D]O\} } | j D]7\}}|jt|d fjt|9Q|jd D]k\} } | j D]S\}}|j|j|d |} |jt|| d |j |Um|jr|j!d d D]Q\}}}} | j D]7\}}|jt|dfjt|9S|j!d d D]m\}}}} | j D]S\}}|j|j|d|} |jt|| d| j |Uon|j!d D]P\}}} | j D]7\}}|jt|dfjt|9R|j!d D]l\}}} | j D]S\}}|j|j|d|} |jt|| d| j |Un|j"D])}|jj%||j&+t)|j|j&}|5|j+d||i|j-|||j/||dddycc}}w#1swYyxYw)rrrrNrrrrrrTrr)rrrr)rrrrrrrrr%rrrrrrrrrrrrrrrr)rdrrrrrr graphdatarrrrrTrekeyrpincremental_writers rrz#GraphMLWriterLxml.add_graph_elements ==? *  , ''++dD) ? II--gCT-UM II--%67.M  188 qD  ww{{>26 ww{{>26 OO% ADAq  #a&'!2 3 7 7Q @ AOO% >DAq,,T^^Aw-JKL LLQw = >wwDw) DGD!  D1$$c!ff%56::47C D DwwDw) EGD!  E1%%dnnQ&BC SVQ 0@0@0CD E E ?? !"d!> H 1dAGGIHDAq((#a&&)9:>>tAwGH H"#d!> I 1dAGGIIDAq))$..FA*FGALLQFL4D4DQ4GHI I 777- H1aGGIHDAq((#a&&)9:>>tAwGH H777- I1aGGIIDAq))$..FA*FGALLQFL4D4DQ4GHI I 88 AC IIOOCd.?.?O @ A0 4;L;LM  2   );Y K NN10 1 NN10 1 2 2[ Z 2 2s S9S!!S*c |jD]f\}}|jt||jt|||t|||j |}|j |hy)zAppends attribute data.N)rrr%rrr)rdrrrrrrrs rrz GraphMLWriterLxml.add_attributes3sdJJL )DAq==As1vua8#a&%UVL NN< (  )rc,tj|SrL)objectr)rds rrzGraphMLWriterLxml.__str__;s~~d##rcx|jjddd|jjdddyrL)r__exit__r)rdrs rrzGraphMLWriterLxml.dump>s. tT40 dD1rrrL)rsrtrurrrrrr|rrr"r"s2!#,*\D2L)$2rr"cFeZdZdZeedfdZd dZd dZdZ dZ d Z d Z y) r z:Read a GraphML document. Produces NetworkX graph objects.Fc\|j||_||_||_i|_yrL)rgr5r6 multigraphedge_ids)rdr5r6r7s rrzGraphMLReader.__init__Js+ "** rNc#6Kddlm}m}||||_n||||_n t d|j |j\}}|jj d|jdD]}|j|||yw)Nr)r fromstring)filez/Must specify either 'path' or 'string' as kwarg{}graph) rrr r ValueErrorfind_graphml_keysfindallrv make_graph)rdrr,rr rdefaultsgs r__call__zGraphMLReader.__call__QsA  "-DH  !&)DHNO O11$((;x!!Bt&7w"?@ 5A//!T84 4 5sBBcL|jdd}|.|dk(rtj}ntj}i|jd<i|jd<|j D]t\}}||d}||d} ||d} |dk(r&|jdj | | |i|d k(sO|jdj | | |iv|jd |jd } | tjd |jd |jd D]} |j|| |||jd |jdD]} |j|| ||j||}|jj ||jr|S|jrtj |ntj"|}tj$||j&d|S)Nrrrrrrrrrr z }hyperedgez)GraphML reader doesn't support hyperedgesz}nodez}edger)valuesr)rr3 MultiDiGraph MultiGraphrrupdatefindrvr4radd_nodeadd_edgedecode_data_elementsrrDiGraphGraphset_edge_attributesr)rd graph_xml graphml_keysrrrkey_idrkey_forrrc hyperedgenode_xmledge_xmlrs rrzGraphMLReader.make_graph^smmM48 9j(OO%MMO"$"$%^^- KMFE"6*51G'/D&v.v6K& '..k%6H/IJ& '..k%6H/IJ KNNR'8 #DE  ""#NO O!))Bt.?v*FG ?H MM!X|X > ?"))Bt.?v*FG 5H MM!X| 4 5((yA t ??H]]_BJJqM"((1+ qTBrc|jd|jd}|tjd|j |j d}|j ||}|j|fi||jj ddk(r4|jd|jd}|j||||yy) zAdd a node to the graph.r }portNGraphML port tag not supported.rzyfiles.foldertypegroupr ) rrvwarningswarnr5rrrattribr) rdrr&r"rportsnode_idrr!s rrzGraphMLReader.add_nodes 4??"36:;   MM; <..d!34((x@ 7#d# ??  2 3w > 4??*;7&CDI OOI|Xq A ?rc|jd|jd}|tjd|j d}|j r|dk(rd}t j||j s|dk(rd }t j||j|j d }|j|j d }|j||} |j d } | r$| |j||f< |j| } n| j d } |j||rd|_|j||| | fgy#t$rY;wxYw)zAdd an edge to the graph.r r)Nr*rriz,directed=false edge found in directed graph.rhz-directed=true edge found in undirected graph.rrrrpT)rrvr,r-rrr3r4r5rrr6rhas_edgeradd_edges_from) rdrrr"r/rmsgrrredge_ids rrzGraphMLReader.add_edgesg!!Bt&7v">?   MM; < ##J/ ==?x72@C""3' ' X%7AC""3' ' 0 0 :; 0 0 :;((|D""4( ,3DMM&&. ) ,,W5hhuoG ::ff %"DO 667D9:;  sE** E65E6c hi}|jd|jdD]}|jd} ||d}||d}|j } | Ltt|dk(r5|tur!|j| j||<t|| ||<tt|dkDrBd} |jd|jd } | | jd |d <d D]} d|jd | d|jd } |j| d}|(|jd|d<|jd|d<| |j| d} |j| d}||jd|d <| | j |d<dD]:}d|jd |d|jd } |j| d}|:n|j |d<| d||<|S#t$r}t j d||d}~wwxYw)z:Use the key information to decode the data XML if present.r z}datarprrzBad GraphML data: no key Nrz }GenericNode configuration shape_type) GenericNode ShapeNodeSVGNode ImageNode}z/{Geometryxy NodeLabelShapelabel) PolyLineEdge SplineEdge QuadCurveEdge BezierEdgeArcEdge EdgeLabel)rrvrrnr3r4rr/r.rQr{lowerrrx)rdr"obj_xmlrrrp data_name data_typerqr node_labelgnr5prefgeometryshape edge_type edge_labels rrz"GraphMLReader.decode_data_elementss#OOb0A,HI5 %L""5)C S(-f5 (-f5  $$DC\(:$;q$@$'+&7&7 &EDO&/oDOT,'(1,! !&&DII;m'DE>)+)@D&!U ?I {"YKs499+RHD+00D61BCH+$,LL$5S $,LL$5S !)%1%6%6$y7I%J (--en=E(-2YYv->\* ?)$.OODM" I  {"YKs499+RHD!-!2!2dV93E!FJ!- )$.OODM"$Yk5 %l c S&&)B3%'HIsR SsH  H1H,,H1ci}i}|jd|jdD]}|jd}|jd}|jd}|jd}||}d}|d}tjd |d |t j d |d ||j||jd d||<|jd|jd} | ||d} | tur,|j| jj||< | | j||< ||fS)z4Extracts all the keys and key defaults from the xml.r z}keyrrrz yfiles.typerEr,zNo key type for id z. Using stringzUnknown key for id .r)rrrz}defaultr) rrvrr,r-r3r4rcrrQr{rrK) rdrr"graphml_key_defaultsrattr_idr attr_name yfiles_typerrcs rrzGraphMLReader.find_graphml_keyssn !&&DOO+rasC)V#$  1433l 14DDR ,(^ 14T2!$C%E3EPT2!uF3FRLL^]G]@ ? ?B2 B2L# V2GV2r