Ë
    D^(h–™  ã                   ó   — d Z ddlZddlmZ ddlZddlmZ g d¢Z edd¬«      	 	 	 	 	 dd„«       Z	 edd¬«      	 	 	 	 	 dd„«       Z
	 	 	 	 dd„Z edd¬«       ej                  dd	¬«      eed
fd„«       «       Z ej                  dd	¬«      eed
fd„«       Z G d„ d«      Z G d„ de«      Z G d„ d«      Z G d„ de«      Ze
Z G d„ de«      Zy)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_graphmlÚgenerate_graphmlÚwrite_graphml_xmlÚwrite_graphml_lxmlÚparse_graphmlÚGraphMLWriterÚGraphMLReaderé   Úwb)ÚmodeTFc                 óh   — t        |||||¬«      }|j                  | «       |j                  |«       y)a  Write 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ÚprettyprintÚinfer_numeric_typesÚnamed_key_idsÚedge_id_from_attributeN)r   Úadd_graph_elementÚdump)ÚGÚpathr   r   r   r   r   Úwriters           úX/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/networkx/readwrite/graphml.pyr   r   >   s:   € ôX ØØØ/Ø#Ø5ô€Fð ×Ñ˜QÔØ
‡K�K�Õó    c           
      ó–   — 	 ddl m} t	        || |||||¬«      }|j                  «        y# t        $ r t        | ||||||«      cY S w xY w)a†  Write 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.
    r   N)Úgraphr   r   r   r   r   )Ú
lxml.etreeÚetreeÚImportErrorr   ÚGraphMLWriterLxmlr   )	r   r   r   r   r   r   r   Ú	lxmletreer   s	            r   r	   r	   u   sj   € ð^
Ý&ô ØØØØØ/Ø#Ø5ô€Fð ‡K�K…Møô) ò 	
Ü ØØØØØØØ"ó
ò 	
ð	
ús   ‚+ «AÁAc              #   ó’   K  — t        ||||¬«      }|j                  | «       t        |«      j                  «       E d{  –—†  y7 Œ­w)aB  Generate 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.
    )r   r   r   r   N)r   r   ÚstrÚ
splitlines)r   r   r   r   r   r   s         r   r   r   ½   sE   è ø€ ôJ ØØØ#Ø5ô	€Fð ×Ñ˜QÔÜ�6‹{×%Ñ%Ó'×'Ò'ús   ‚=A¿AÁ AÚrb)ÚgraphsÚreturns_graphc                 ó:  — t        |||«      }t         || ¬«      «      }t        |«      dk(  rjd}| j                  d«       | j	                  «       }|j                  d|«      }t         ||¬«      «      }t        |«      dk(  rt        j                  d«      ‚|d   S )a¡  Read graph in GraphML format from path.

    Parameters
    ----------
    path : file or string
       File or filename to write.
       Filenames ending in .gz or .bz2 will be compressed.

    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".

    )r   r   s7   <graphml xmlns="http://graphml.graphdrawing.org/xmlns">s	   <graphml>©Ústringú%file not successfully read as graphml)r   ÚlistÚlenÚseekÚreadÚreplaceÚnxÚNetworkXError)	r   Ú	node_typeÚedge_key_typeÚforce_multigraphÚreaderÚglistÚheaderÚ	old_bytesÚ	new_bytess	            r   r   r   ì   s�   € ôv ˜9 mÐ5EÓF€Fä‘˜TÔ"Ó#€EÜ
ˆ5ƒz�Q‚àKˆØ�	‰	�!ŒØ—I‘I“Kˆ	Ø×%Ñ% l°FÓ;ˆ	Ü‘V 9Ô-Ó.ˆÜˆu‹:˜Š?Ü×"Ñ"Ð#JÓKÐKØ�‰8€Or   c                 óø   — t        |||«      }t         || ¬«      «      }t        |«      dk(  rId}| j                  d|«      }t         ||¬«      «      }t        |«      dk(  rt	        j
                  d«      ‚|d   S )a   Read 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+   r   z7<graphml xmlns="http://graphml.graphdrawing.org/xmlns">z	<graphml>r-   )r   r.   r/   r2   r3   r4   )Úgraphml_stringr5   r6   r7   r8   r9   r:   Ú
new_strings           r   r
   r
   6  sz   € ôz ˜9 mÐ5EÓF€Fä‘˜~Ô.Ó/€EÜ
ˆ5ƒz�Q‚àJˆØ#×+Ñ+¨K¸Ó@ˆ
Ü‘V :Ô.Ó/ˆÜˆu‹:˜Š?Ü×"Ñ"Ð#JÓKÐKØ�‰8€Or   c                   ó\   — e Zd ZdZdZdZdj                  ddg«      Zd„ Zddddddd	œ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.xsdc                 ón  — t         dft        dft        dft         dft         dft        dft        dft        dfg}	 d	d l}|j
                  df|j                  df|j                  df|j                  df|j                  df|j                  df|j                  df|j                  df|j                  df|j                  df|j                  df|j                   df|j                  df|j"                  df|j$                  dfg|z   }t'        |«      | _        t'        d
„ |D «       «      | _        y #  Y Œ,xY w)NÚintegerÚyfilesr,   ÚintÚlongÚfloatÚdoubleÚbooleanr   c              3   ó2   K  — | ]  }t        |«      –— Œ y ­w©N)Úreversed)Ú.0Úas     r   ú	<genexpr>z*GraphML.construct_types.<locals>.<genexpr>²  s   è ø€ Ò;°¤¨§Ñ;ùs   ‚)rF   r%   rH   ÚboolÚnumpyÚfloat64Úfloat32Úfloat16Úint_Úint8Úint16Úint32Úint64Úuint8Úuint16Úuint32Úuint64ÚintcÚintpÚdictÚxml_typeÚpython_type)ÚselfÚtypesÚnps      r   Úconstruct_typeszGraphML.construct_typesŒ  s>  € ä�)ÐÜ�(ˆOÜ�(ˆOÜ�%ˆLÜ�&ˆMÜ�GÐÜ�HÐÜ�9Ðð	
ˆð	Ûð —‘˜WÐ%Ø—‘˜WÐ%Ø—‘˜WÐ%Ø—‘˜%Ð Ø—‘˜%Ð Ø—‘˜5Ð!Ø—‘˜5Ð!Ø—‘˜5Ð!Ø—‘˜5Ð!Ø—‘˜EÐ"Ø—‘˜EÐ"Ø—‘˜EÐ"Ø—‘˜%Ð Ø—‘˜%Ð Ø—‘˜%Ð ðð  ñ!ˆEô$ ˜U›ˆŒÜÑ;°UÔ;Ó;ˆÕøð/	Ùús   ¼D0 Ä0D4TF)ÚtrueÚfalseÚ0r   Ú1r   c                 ód   — 	 | j                   |   S # t        $ r}t        d|› d�«      |‚d}~ww xY w)z¦Wrapper 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.zGraphML does not support type ú as data values.N)rb   ÚKeyErrorÚ	TypeError)rd   ÚkeyÚerrs      r   Úget_xml_typezGraphML.get_xml_typeÃ  sC   € ð	Ø—=‘= Ñ%Ð%øÜò 	ÜØ0°°Ð5EÐFóàðûð	ús   ‚ ‘	/š*ª/N)Ú__name__Ú
__module__Ú__qualname__Ú
NS_GRAPHMLÚNS_XSIÚNS_YÚjoinÚSCHEMALOCATIONrg   Úconvert_boolrr   © r   r   rA   rA   €  sP   „ Ø8€JØ8€Fà.€DØ—X‘Xà3ØCð	
ó€Nò&<ð\ ØàØØØñ	€Ló	r   rA   c                   óf   — e Zd Z	 	 	 	 	 	 dd„Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zdd„Zy)r   Nc                 ó|  — | j                  «        ddlm} || _        || _        || _        || _        || _        || _        | j                  d| j                  | j                  | j                  dœ«      | _        i | _        t        t        «      | _        t        t"        «      | _        |�| j'                  |«       y y )Nr   )ÚElementÚgraphml©Úxmlnsz	xmlns:xsizxsi:schemaLocation)rg   Úxml.etree.ElementTreer   Ú	myElementr   r   r   r   r   rv   rw   rz   ÚxmlÚkeysr   r.   Ú
attributesÚsetÚattribute_typesr   )rd   r   r   r   r   r   r   r   s           r   Ú__init__zGraphMLWriter.__init__Ð  s«   € ð 	×ÑÔÝ1à ˆŒà#6ˆÔ Ø&ˆÔØ*ˆÔØ&<ˆÔ#Ø ˆŒØ—>‘>ØàŸ™Ø!Ÿ[™[Ø&*×&9Ñ&9ñó
ˆŒð ˆŒ	Ü%¤dÓ+ˆŒÜ*¬3Ó/ˆÔàÐØ×"Ñ" 5Õ)ð r   c                 ó¶   — ddl m} | j                  r| j                  | j                  «        || j                  «      j                  | j                  «      }|S )Nr   )Útostring)rƒ   rŒ   r   Úindentr…   Údecoder   )rd   rŒ   Úss      r   Ú__str__zGraphMLWriter.__str__ò  s@   € Ý2à×ÒØ�K‰K˜Ÿ™Ô!Ù�T—X‘XÓ×%Ñ% d§m¡mÓ4ˆØˆr   c                 ó  — | j                   ri| j                  ||f   }t        |«      dkD  r<|D �ch c]  }| j                  |«      ’Œ }}d|v rt        S d|v sd|v rt
        S t        S t        |«      d   S t        |«      S c c}w )aˆ  Infer 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,   rH   rI   r   )	r   r‰   r/   rr   r%   rH   rF   r.   Útype)rd   ÚnameÚscopeÚvaluere   Úts         r   Ú	attr_typezGraphMLWriter.attr_typeú  s�   € ð ×#Ò#Ø×(Ñ(¨$°¨Ñ7ˆEä�5‹z˜AŠ~Ø7<Ö=°!˜×*Ñ*¨1Õ-Ð=�Ð=Ø˜uÑ$Ü�JØ Ñ%¨°UÑ):Ü �Lä�Jä˜E“{ 1‘~Ð%ä˜“;Ðùò >s   °Bc                 óœ  — |||f}	 | j                   |   S # t        $ r¬ | j                  r|}n!dt        t	        | j                   «      «      › �}|| j                   |<   ||||dœ} | j
                  di |¤Ž}|�2| j                  d«      }	t        |«      |	_        |j                  |	«       | j                  j                  d|«       Y |S w xY w)NÚd)ÚidÚforú	attr.nameú	attr.typeÚdefaultr   ©rp   )r†   rn   r   r/   r.   r„   r%   ÚtextÚappendr…   Úinsert)
rd   r“   r—   r”   rž   Úkeys_keyÚnew_idÚ
key_kwargsÚkey_elementÚdefault_elements
             r   Úget_keyzGraphMLWriter.get_key  sÔ   € Ø˜) UÐ+ˆð	,Ø—9‘9˜XÑ&Ð&øÜò 	,Ø×!Ò!Ø‘àœS¤ d§i¡i£Ó1Ð2Ð3�à"(ˆD�I‰I�hÑàØØ!Ø&ñ	ˆJð )˜$Ÿ.™.Ñ=°*Ñ=ˆKàÐ"Ø"&§.¡.°Ó";�Ü'*¨7£|�Ô$Ø×"Ñ" ?Ô3Ø�H‰H�O‰O˜A˜{Õ+Øˆð)	,ús   ‡ –B1CÃ
Cc                 óà   — || j                   vrt        j                  d|› 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 rm   ÚdatarŸ   )rb   r3   r4   r¨   rr   r„   r%   r    )rd   r“   Úelement_typer•   r”   rž   ÚkeyidÚdata_elements           r   Úadd_datazGraphMLWriter.add_data-  su   € ð
 ˜tŸ}™}Ñ,Ü×"Ñ"Ø2°<°.Ð@PÐQóð ð —‘˜T 4×#4Ñ#4°\Ó#BÀEÈ7ÓSˆØ—~‘~ f°%�~Ó8ˆÜ ›JˆÔØÐr   c           	      óú   — |j                  «       D ]h  \  }}| j                  t        |«      |f   j                  t	        |«      «       | j
                  |   j                  ||||j                  |«      g«       Œj y)z€Appends attribute data to edges or nodes, and stores type information
        to be added later. See add_graph_element.
        N)Úitemsr‰   r%   Úaddr’   r‡   r¡   Úget)rd   r”   Úxml_objrª   rž   ÚkÚvs          r   Úadd_attributeszGraphMLWriter.add_attributes;  sl   € ð —J‘J“Lò 	K‰DˆAˆqØ× Ñ ¤# a£&¨% Ñ1×5Ñ5´d¸1³gÔ>Ø�O‰O˜GÑ$×+Ñ+¨Q°°5¸'¿+¹+Àa».Ð,IÕJñ	Kr   c                 óò   — |j                   j                  di «      }|j                  d¬«      D ]F  \  }}| j                  dt	        |«      ¬«      }| j                  d|||«       |j                  |«       ŒH y )NÚnode_defaultT©rª   Únode)rš   )r   r²   Únodesr„   r%   r¶   r¡   )rd   r   Úgraph_elementrž   rº   rª   Únode_elements          r   Ú	add_nodeszGraphMLWriter.add_nodesC  sl   € Ø—'‘'—+‘+˜n¨bÓ1ˆØŸ'™' t˜'Ó,ò 	/‰JˆD�$ØŸ>™>¨&´S¸³Y˜>Ó?ˆLØ×Ñ ¨°d¸GÔDØ× Ñ  Õ.ñ	/r   c                 óŠ  — |j                  «       rÍ|j                  dd¬«      D ]¶  \  }}}}| j                  dt        |«      t        |«      | j                  r2| j                  |v r$t        |j                  | j                  «      «      n
t        |«      ¬«      }|j                  j                  di «      }| j                  d|||«       |j                  |«       Œ¸ y |j                  d¬«      D ]Ñ  \  }}}| j                  rX| j                  |v rJ| j                  dt        |«      t        |«      t        |j                  | j                  «      «      ¬«      }n&| j                  dt        |«      t        |«      ¬«      }|j                  j                  di «      }| j                  d|||«       |j                  |«       ŒÓ y )NT)rª   r†   Úedge)ÚsourceÚtargetrš   Úedge_defaultr¹   )rÁ   rÂ   )	Úis_multigraphÚedgesr„   r%   r   r²   r   r¶   r¡   )	rd   r   r¼   Úurµ   rp   rª   Úedge_elementrž   s	            r   Ú	add_edgeszGraphMLWriter.add_edgesJ  s�  € Ø�?‰?ÔØ#$§7¡7°¸4 7Ó#@ò 3‘��1�c˜4Ø#Ÿ~™~ØÜ˜q›6Ü˜q›6à×2Ò2Ø×3Ñ3°tÑ;ô ˜4Ÿ8™8 D×$?Ñ$?Ó@ÔAô ˜S›ð  .ó  �ð Ÿ'™'Ÿ+™+ n°bÓ9�Ø×#Ñ# F¨L¸$ÀÔHØ×$Ñ$ \Õ2ñ3ð  Ÿg™g¨4˜gÓ0ò 3‘
��1�dØ×.Ò.°4×3NÑ3NÐRVÑ3Và#'§>¡>ØÜ" 1›vÜ" 1›vÜ˜tŸx™x¨×(CÑ(CÓDÓEð	 $2ó $‘Lð $(§>¡>°&ÄÀQÃÔPSÐTUÓPV >Ó#W�LØŸ'™'Ÿ+™+ n°bÓ9�Ø×#Ñ# F¨L¸$ÀÔHØ×$Ñ$ \Õ2ñ3r   c                 ó¼  — |j                  «       rd}nd}|j                  j                  dd«      }|€| j                  d|¬«      }n| j                  d||¬«      }i }|j                  j	                  «       D ��ci c]  \  }}|dvr||“Œ }}}| j                  d|||«       | j                  ||«       | j                  ||«       | j                  j	                  «       D ]X  \  }	}|D ]N  \  }}}
}|	j                  | j                  t        |«      | j                  ||
|«      t        |«      |
|«      «       ŒP ŒZ | j                  j                  |«       yc c}}w )	ú=
        Serialize graph G in GraphML to the stream.
        ÚdirectedÚ
undirectedrš   Nr   ©Úedgedefault©rÎ   rš   ©r¸   rÃ   )Úis_directedr   Úpopr„   r°   r¶   r¾   rÈ   r‡   r¡   r®   r%   r—   r…   )rd   r   Údefault_edge_typeÚgraphidr¼   rž   r´   rµ   rª   r³   r”   s              r   r   zGraphMLWriter.add_graph_elementj  s\  € ð �=‰=Œ?Ø *Ñà ,Ðà—'‘'—+‘+˜d DÓ)ˆØˆ?Ø ŸN™N¨7Ð@Q˜NÓR‰Mà ŸN™NØÐ%6¸7ð +ó ˆMð ˆð Ÿ'™'Ÿ-™-›/÷
á��AØÐ8Ñ8ð ˆq‰Dð
ˆñ 
ð
 	×Ñ˜G ]°D¸'ÔBØ�‰�q˜-Ô(Ø�‰�q˜-Ô(ð "Ÿ_™_×2Ñ2Ó4ò 	‰MˆG�TØ(,ò Ñ$��1�e˜WØ—‘Ø—M‘MÜ˜A› §¡¨q°%¸Ó ;¼SÀ»VÀUÈGóõñð	ð 	�‰�‰˜Õ&ùó)
s   Á;Ec                 ó4   — |D ]  }| j                  |«       Œ y)z)Add many graphs to this GraphML document.N)r   )rd   Ú
graph_listr   s      r   Ú
add_graphszGraphMLWriter.add_graphs‘  s   € àò 	&ˆAØ×"Ñ" 1Õ%ñ	&r   c                 ó¾   — ddl m} | j                  r| j                  | j                  «        || j                  «      }|j                  || j                  d¬«       y )Nr   )ÚElementTreeT)r   Úxml_declaration)rƒ   rÙ   r   r�   r…   Úwriter   )rd   ÚstreamrÙ   Údocuments       r   r   zGraphMLWriter.dump–  sB   € Ý5à×ÒØ�K‰K˜Ÿ™Ô!Ù˜tŸx™xÓ(ˆØ�‰�v¨¯©ÀtˆÕLr   c                 óÜ  — d|dz  z   }t        |«      r¨|j                  r|j                  j                  «       s
|dz   |_        |j                  r|j                  j                  «       s||_        |D ]  }| j	                  ||dz   «       Œ |j                  r|j                  j                  «       s||_        y y |r/|j                  r|j                  j                  «       s||_        y y y )Nú
z  r   )r/   r    ÚstripÚtailr�   )rd   ÚelemÚlevelÚis       r   r�   zGraphMLWriter.indentž  s¹   € à�5˜4‘<ÑˆÜˆtŒ9Ø—9’9 D§I¡I§O¡OÔ$5Ø ™H�”	Ø—9’9 D§I¡I§O¡OÔ$5Ø�”	Øò -�Ø—‘˜D %¨!¡)Õ,ð-à—9’9 D§I¡I§O¡OÔ$5Ø�•	ð %6ñ ˜dŸiši¨t¯y©y¯©Ô/@Ø�•	ð 0Aˆur   ©Núutf-8TFFN)ÚallN)r   )rs   rt   ru   rŠ   r�   r—   r¨   r®   r¶   r¾   rÈ   r   r×   r   r�   r|   r   r   r   r   Ï  sW   „ ð ØØØ!ØØ#ó *òDòò2ó4òKò/ò3ò@%'òN&ò
Môr   r   c                   ó   — e Zd ZdZd„ Zd„ Zy)ÚIncrementalElementzÉWrapper 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                 ó    — || _         || _        y rL   )r…   r   )rd   r…   r   s      r   rŠ   zIncrementalElement.__init__¶  s   € ØˆŒØ&ˆÕr   c                 óR   — | j                   j                  || j                  ¬«       y )N©Úpretty_print)r…   rÛ   r   )rd   Úelements     r   r¡   zIncrementalElement.appendº  s   € Ø�‰�‰�w¨T×-=Ñ-=ˆÕ>r   N)rs   rt   ru   Ú__doc__rŠ   r¡   r|   r   r   ré   ré   ¯  s   „ ñò'ó?r   ré   c                   ó:   — e Zd Z	 	 	 	 	 	 dd„Zd„ Zd„ Zd„ Zdd„Zy)	r"   Nc                 ó‚  — | j                  «        dd lm} |j                  | _        || _        || _        || _        || _        || _	        |j                  ||¬«      | _        | j                  j                  «       | _        | j                  j                  «        g | _        | j                  | _        | j                  j#                  d| j$                  | j&                  | j(                  dœ«      | _        | j*                  j                  «        i | _        t/        t0        «      | _        |�| j5                  |«       y y )Nr   )r   r€   r�   )rg   r   r    r   r„   Ú	_encodingÚ_prettyprintr   r   r   ÚxmlfileÚ	_xml_baseÚ	__enter__Ú_xmlÚwrite_declarationr…   Ú_keysrî   rv   rw   rz   Ú_graphmlr†   r   rˆ   r‰   r   )	rd   r   r   r   r   r   r   r   r#   s	            r   rŠ   zGraphMLWriterLxml.__init__¿  s
  € ð 	×ÑÔÝ&à"×*Ñ*ˆŒà!ˆŒØ'ˆÔØ*ˆÔØ&<ˆÔ#Ø#6ˆÔ à"×*Ñ*¨4¸(Ð*ÓCˆŒØ—N‘N×,Ñ,Ó.ˆŒ	Ø�	‰	×#Ñ#Ô%ð ˆŒØ—X‘XˆŒ
ØŸ	™	×)Ñ)ØàŸ™Ø!Ÿ[™[Ø&*×&9Ñ&9ñó
ˆŒð 	�‰×ÑÔ!ØˆŒ	Ü*¬3Ó/ˆÔàÐØ×"Ñ" 5Õ)ð r   c           
      óÚ	  — |j                  «       rd}nd}|j                  j                  dd«      }|€| j                  j	                  d|¬«      }n| j                  j	                  d||¬«      }|j                  j                  «       D ��ci c]  \  }}|dvr||“Œ }}}|j                  j                  d	i «      }|j                  j                  d
i «      }	|j                  «       D ]7  \  }}| j                  t        |«      df   j                  t        |«      «       Œ9 |j                  «       D ]D  \  }}| j                  | j                  |d|«      «      }
| j                  t        |«      |
dd«       ŒF |j                  d¬«      D ]O  \  }}|j                  «       D ]7  \  }}| j                  t        |«      df   j                  t        |«      «       Œ9 ŒQ |j                  d¬«      D ]k  \  }}|j                  «       D ]S  \  }}| j                  | j                  |d|«      «      }| j                  t        |«      |d|j                  |«      «       ŒU Œm |j                  «       rë|j!                  dd¬«      D ]Q  \  }}}}|j                  «       D ]7  \  }}| j                  t        |«      df   j                  t        |«      «       Œ9 ŒS |j!                  dd¬«      D ]m  \  }}}}|j                  «       D ]S  \  }}| j                  | j                  |d|«      «      }| j                  t        |«      |d|	j                  |«      «       ŒU Œo næ|j!                  d¬«      D ]P  \  }}}|j                  «       D ]7  \  }}| j                  t        |«      df   j                  t        |«      «       Œ9 ŒR |j!                  d¬«      D ]l  \  }}}|j                  «       D ]S  \  }}| j                  | j                  |d|«      «      }| j                  t        |«      |d|	j                  |«      «       ŒU Œn | j"                  D ])  }| j                  j%                  || j&                  ¬«       Œ+ t)        | j                  | j&                  «      }|5  | j+                  d||i «       | j-                  ||«       | j/                  ||«       ddd«       yc c}}w # 1 sw Y   yxY w)rÊ   rË   rÌ   rš   Nr   rÍ   rÏ   rÐ   r¸   rÃ   Tr¹   rº   )r†   rª   rÀ   rì   )rÑ   r   rÒ   r÷   rî   r°   r²   r‰   r%   r±   r’   rr   r—   r¨   r»   rÄ   rÅ   r…   rÛ   ró   ré   r¶   r¾   rÈ   )rd   r   rÓ   rÔ   r¼   r´   rµ   Ú	graphdatar¸   rÃ   r«   rº   r™   ÚTrÆ   Úekeyrp   Úincremental_writers                     r   r   z#GraphMLWriterLxml.add_graph_elementí  sµ  € ð �=‰=Œ?Ø *Ñà ,Ðà—'‘'—+‘+˜d DÓ)ˆØˆ?Ø ŸI™I×-Ñ-¨gÐCTÐ-ÓU‰Mà ŸI™I×-Ñ-ØÐ%6¸7ð .ó ˆMð Ÿ™Ÿ™›÷
á��1ØÐ8Ñ8ð ˆq‰Dð
ˆ	ñ 
ð
 —w‘w—{‘{ >°2Ó6ˆØ—w‘w—{‘{ >°2Ó6ˆà—O‘OÓ%ò 	A‰DˆAˆqØ× Ñ ¤# a£&¨'Ð!2Ñ3×7Ñ7¼¸Q»Õ@ð	Aà—O‘OÓ%ò 	>‰DˆAˆqØ×,Ñ,¨T¯^©^¸A¸wÈÓ-JÓKˆLØ�L‰Lœ˜Q› ¨w¸Õ=ð	>ð —w‘w D�wÓ)ò 	D‰GˆD�!ØŸ™›	ò D‘��1Ø×$Ñ$¤c¨!£f¨fÐ%5Ñ6×:Ñ:¼4À»7ÕCñDð	Dð —w‘w D�wÓ)ò 	E‰GˆD�!ØŸ™›	ò E‘��1Ø×%Ñ% d§n¡n°Q¸ÀÓ&BÓC�Ø—‘œS ›V Q¨°×0@Ñ0@ÀÓ0CÕDñEð	Eð
 �?‰?ÔØ!"§¡¨d¸ Ó!>ò H‘��1�d˜AØŸG™G›Iò H‘D�A�qØ×(Ñ(¬#¨a«&°&Ð)9Ñ:×>Ñ>¼tÀA»wÕGñHðHð "#§¡¨d¸ Ó!>ò I‘��1�d˜AØŸG™G›Iò I‘D�A�qØ×)Ñ)¨$¯.©.¸¸FÀAÓ*FÓG�AØ—L‘L¤ Q£¨¨F°L×4DÑ4DÀQÓ4GÕHñIñIð
 Ÿ7™7¨˜7Ó-ò H‘��1�aØŸG™G›Iò H‘D�A�qØ×(Ñ(¬#¨a«&°&Ð)9Ñ:×>Ñ>¼tÀA»wÕGñHðHð Ÿ7™7¨˜7Ó-ò I‘��1�aØŸG™G›Iò I‘D�A�qØ×)Ñ)¨$¯.©.¸¸FÀAÓ*FÓG�AØ—L‘L¤ Q£¨¨F°L×4DÑ4DÀQÓ4GÕHñIðIð —8‘8ò 	AˆCØ�I‰I�O‰O˜C¨d×.?Ñ.?ˆOÕ@ð	Aô 0°·	±	¸4×;LÑ;LÓMÐØñ 	2Ø×Ñ Ð);¸YÈÔKØ�N‰N˜1Ð0Ô1Ø�N‰N˜1Ð0Ô1÷	2ð 	2ùó[
÷Z	2ð 	2ús   ÂSÒ9S!Ó!S*c           
      óö   — |j                  «       D ]f  \  }}| j                  t        |«      | j                  t        |«      ||«      t        |«      ||j	                  |«      «      }|j                  |«       Œh y)zAppends attribute data.N)r°   r®   r%   r—   r²   r¡   )rd   r”   r³   rª   rž   r´   rµ   r­   s           r   r¶   z GraphMLWriterLxml.add_attributes3  sd   € à—J‘J“Lò 	)‰DˆAˆqØŸ=™=Ü�A“˜Ÿ™¤s¨1£v¨u°aÓ8¼#¸a»&À%ÈÏÉÐUVËóˆLð �N‰N˜<Õ(ñ		)r   c                 ó,   — t         j                  | «      S rL   )Úobjectr�   )rd   s    r   r�   zGraphMLWriterLxml.__str__;  s   € Ü�~‰~˜dÓ#Ð#r   c                 óx   — | j                   j                  d d d «       | j                  j                  d d d «       y rL   )rú   Ú__exit__rõ   )rd   rÜ   s     r   r   zGraphMLWriterLxml.dump>  s.   € Ø�‰×Ñ˜t T¨4Ô0Ø�‰×Ñ  d¨DÕ1r   rå   rL   )rs   rt   ru   rŠ   r   r¶   r�   r   r|   r   r   r"   r"   ¾  s2   „ ð ØØØ!ØØ#ó,*ò\D2òL)ò$ô2r   r"   c                   óF   — e Zd ZdZeedfd„Zdd„Zdd„Zd„ Z	d„ Z
d	„ Zd
„ Zy)r   z:Read a GraphML document.  Produces NetworkX graph objects.Fc                 ó\   — | j                  «        || _        || _        || _        i | _        y rL   )rg   r5   r6   Ú
multigraphÚedge_ids)rd   r5   r6   r7   s       r   rŠ   zGraphMLReader.__init__J  s+   € Ø×ÑÔØ"ˆŒØ*ˆÔØ*ˆŒØˆ�r   Nc              #   ó6  K  — ddl m}m} |� ||¬«      | _        n|� ||«      | _        nt	        d«      ‚| j                  | j                  «      \  }}| j                  j                  d| j                  › d�«      D ]  }| j                  |||«      –— Œ y ­w)Nr   )rÙ   Ú
fromstring)Úfilez/Must specify either 'path' or 'string' as kwargú{ú}graph)	rƒ   rÙ   r
  r…   Ú
ValueErrorÚfind_graphml_keysÚfindallrv   Ú
make_graph)rd   r   r,   rÙ   r
  r†   ÚdefaultsÚgs           r   Ú__call__zGraphMLReader.__call__Q  s‘   è ø€ ßAàÐÙ"¨Ô-ˆD�HØÐÙ! &Ó)ˆD�HäÐNÓOÐOØ×1Ñ1°$·(±(Ó;ÑˆˆxØ—‘×!Ñ! B t§¡Ð&7°wÐ"?Ó@ò 	5ˆAØ—/‘/ ! T¨8Ó4Ó4ñ	5ùs   ‚BBc                 óL  — |j                  dd «      }|€.|dk(  rt        j                  «       }nt        j                  «       }i |j                  d<   i |j                  d<   |j                  «       D ]t  \  }}||   d   }||   d   }	||   d   }
|dk(  r&|j                  d   j                  |	 |
|«      i«       |d	k(  sŒO|j                  d   j                  |	 |
|«      i«       Œv |j                  d
| j                  › d�«      }|�t        j                  d«      ‚|j                  d
| j                  › d�«      D ]  }| j                  ||||«       Œ |j                  d
| j                  › d�«      D ]  }| j                  |||«       Œ | j                  ||«      }|j                  j                  |«       | j                  r|S |j                  «       rt        j                   |«      nt        j"                  |«      }t        j$                  || j&                  d¬«       |S )NrÎ   rË   r¸   rÃ   r›   r“   r’   rº   rÀ   r  z
}hyperedgez)GraphML reader doesn't support hyperedgesz}nodez}edgerš   )Úvaluesr“   )r²   r3   ÚMultiDiGraphÚ
MultiGraphr   r°   ÚupdateÚfindrv   r4   r  Úadd_nodeÚadd_edgeÚdecode_data_elementsr  rÑ   ÚDiGraphÚGraphÚset_edge_attributesr  )rd   Ú	graph_xmlÚgraphml_keysr  r   rÎ   Úkey_idr•   Úkey_forr“   rc   Ú	hyperedgeÚnode_xmlÚedge_xmlrª   s                  r   r  zGraphMLReader.make_graph^  s  € à—m‘m M°4Ó8ˆØˆ9Ø˜jÒ(Ü—O‘OÓ%‘ä—M‘M“O�à"$ˆ�‰�ÑØ"$ˆ�‰�ÑØ%Ÿ^™^Ó-ò 	K‰MˆF�EØ" 6Ñ*¨5Ñ1ˆGØ Ñ'¨Ñ/ˆDØ& vÑ.¨vÑ6ˆKØ˜&Ò Ø—‘˜Ñ'×.Ñ.°±kÀ%Ó6HÐ/IÔJØ˜&Ó Ø—‘˜Ñ'×.Ñ.°±kÀ%Ó6HÐ/IÕJð	Kð —N‘N R¨¯©Ð'8¸Ð#DÓEˆ	ØÐ Ü×"Ñ"Ð#NÓOÐOà!×)Ñ)¨B¨t¯©Ð.?¸vÐ*FÓGò 	?ˆHØ�M‰M˜!˜X |°XÕ>ð	?ð "×)Ñ)¨B¨t¯©Ð.?¸vÐ*FÓGò 	5ˆHØ�M‰M˜!˜X |Õ4ð	5ð ×(Ñ(¨°yÓAˆØ	�‰�‰�tÔð �?Š?ØˆHàŸ]™]œ_ŒB�J‰J�qŒM´"·(±(¸1³+ˆä
×Ñ˜q¨¯©¸TÕBØˆr   c                 óž  — |j                  d| j                  › d�«      }|�t        j                  d«       | j	                  |j                  d«      «      }| j                  ||«      } |j                  |fi |¤Ž |j                  j                  d«      dk(  r4|j                  d| j                  › d�«      }| j                  ||||«       yy)	zAdd a node to the graph.r  ú}portNúGraphML port tag not supported.rš   zyfiles.foldertypeÚgroupr  )
r  rv   ÚwarningsÚwarnr5   r²   r  r  Úattribr  )	rd   r   r&  r"  r  ÚportsÚnode_idrª   r!  s	            r   r  zGraphMLReader.add_nodeˆ  sº   € ð —‘  4§?¡?Ð"3°6Ð:Ó;ˆØÐÜ�M‰MÐ;Ô<à—.‘. §¡¨dÓ!3Ó4ˆà×(Ñ(¨°xÓ@ˆØˆ�
‰
�7Ñ#˜dÒ#à�?‰?×ÑÐ2Ó3°wÒ>Ø Ÿ™¨¨4¯?©?Ð*;¸7Ð&CÓDˆIØ�O‰O˜I |°X¸qÕAð ?r   c                 óò  — |j                  d| j                  › d�«      }|�t        j                  d«       |j	                  d«      }|j                  «       r|dk(  rd}t        j                  |«      ‚|j                  «       s|dk(  rd	}t        j                  |«      ‚| j                  |j	                  d
«      «      }| j                  |j	                  d«      «      }| j                  ||«      }	|j	                  d«      }
|
r$|
| j                  ||f<   	 | j                  |
«      }
n|	j	                  d«      }
|j                  ||«      rd| _        |j                  |||
|	fg«       y# t        $ r Y Œ;w xY w)zAdd an edge to the graph.r  r)  Nr*  rË   ri   z,directed=false edge found in directed graph.rh   z-directed=true edge found in undirected graph.rÁ   rÂ   rš   rp   T)r  rv   r,  r-  r²   rÑ   r3   r4   r5   r  r  r6   r  Úhas_edger  Úadd_edges_from)rd   r   rÇ   r"  r/  rË   ÚmsgrÁ   rÂ   rª   Úedge_ids              r   r  zGraphMLReader.add_edge˜  sg  € ð ×!Ñ! B t§¡Ð&7°vÐ">Ó?ˆØÐÜ�M‰MÐ;Ô<ð  ×#Ñ# JÓ/ˆØ�=‰=Œ?˜x¨7Ò2Ø@ˆCÜ×"Ñ" 3Ó'Ð'Ø—‘” X°Ò%7ØAˆCÜ×"Ñ" 3Ó'Ð'à—‘ × 0Ñ 0°Ó :Ó;ˆØ—‘ × 0Ñ 0°Ó :Ó;ˆØ×(Ñ(¨°|ÓDˆð ×"Ñ" 4Ó(ˆÙà,3ˆD�M‰M˜& &˜.Ñ)ðØ×,Ñ,¨WÓ5‘ð —h‘h˜u“oˆGà�:‰:�f˜fÔ%à"ˆDŒOð 	
×Ñ˜6 6¨7°DÐ9Ð:Õ;øô ò Ùðús   ÄE* Å*	E6Å5E6c           	      ój  — i }|j                  d| j                  › d�«      D �]ã  }|j                  d«      }	 ||   d   }||   d   }|j                  }	|	�Mt        t        |«      «      dk(  r6|t        k(  r!| j                  |	j                  «          ||<   Œu ||	«      ||<   Œ�t        t        |«      «      dkD  �rBd}
|j                  d| j                  › d	�«      }|�|j                  d
«      |d<   dD ]¡  }d| j                  › d|› d| j                  › d�}|j                  |› d�«      }|�(|j                  d«      |d<   |j                  d«      |d<   |
€|j                  |› d�«      }
|j                  |› d�«      }|€ŒŽ|j                  d«      |d<   Œ£ |
�|
j                  |d<   dD ]:  }d| j                  › d|› d| j                  › d�}|j                  |› d�«      }|€Œ: n €�ŒÊ|j                  |d<   �ŒÛ|	��Œßd||<   �Œæ |S # t        $ r}t	        j
                  d|› �«      |‚d}~ww xY w)z:Use the key information to decode the data XML if present.r  z}datarp   r“   r’   zBad GraphML data: no key Nr   z}GenericNodeÚconfigurationÚ
shape_type)ÚGenericNodeÚ	ShapeNodeÚSVGNodeÚ	ImageNodeú}z/{ÚGeometryÚxÚyÚ	NodeLabelÚShapeÚlabel)ÚPolyLineEdgeÚ
SplineEdgeÚQuadCurveEdgeÚ
BezierEdgeÚArcEdgeÚ	EdgeLabelÚ )r  rv   r²   rn   r3   r4   r    r/   r.   rQ   r{   Úlowerr  rx   )rd   r"  Úobj_xmlrª   r­   rp   Ú	data_nameÚ	data_typerq   r    Ú
node_labelÚgnr5   ÚprefÚgeometryÚshapeÚ	edge_typeÚ
edge_labels                     r   r  z"GraphMLReader.decode_data_elementsÁ  s†  € àˆØ#ŸO™O¨b°·±Ð0AÀÐ,HÓIó 5	%ˆLØ×"Ñ" 5Ó)ˆCðSØ(¨Ñ-¨fÑ5�	Ø(¨Ñ-¨fÑ5�	ð  ×$Ñ$ˆDàÐ¤C¬¨\Ó(:Ó$;¸qÒ$@Ø¤Ò$ð '+×&7Ñ&7¸¿
¹
»Ñ&E�D˜’Oá&/°£o�D˜’OÜ”T˜,Ó'Ó(¨1Ó,à!�
à!×&Ñ&¨¨D¯I©I¨;°mÐ'DÓE�Ø�>Ø)+¯©°Ó)@�D˜Ñ&Ø!Uò 
?�IØ §	¡	˜{¨"¨Y¨K°s¸4¿9¹9¸+ÀRÐH�DØ+×0Ñ0°D°6¸Ð1BÓC�HØÐ+Ø$,§L¡L°Ó$5˜˜S™	Ø$,§L¡L°Ó$5˜˜S™	Ø!Ð)Ø%1×%6Ñ%6¸$¸¸yÐ7IÓ%J˜
Ø(×-Ñ-°°°e¨nÓ=�EØÑ(Ø-2¯Y©Y°vÓ->˜˜\Ò*ð
?ð Ð)Ø$.§O¡O�D˜‘Mð"ò 
�Ið   §	¡	˜{¨"¨Y¨K°s¸4¿9¹9¸+ÀRÐH�DØ!-×!2Ñ!2°d°V¸9Ð3EÓ!F�JØ!Ñ-Ùð
ð Ò)Ø$.§O¡O�D˜“MØ’Ø"$��Y“ðk5	%ðl ˆøôc ò SÜ×&Ñ&Ð)BÀ3À%Ð'HÓIÈsÐRûðSús   ¸HÈ	H2ÈH-È-H2c                 ó”  — i }i }|j                  d| j                  › d�«      D �]  }|j                  d«      }|j                  d«      }|j                  d«      }|j                  d«      }|�|}d}|€d}t        j                  d	|› d
�«       |€t        j                  d|› d�«      ‚|| j                  |   |j                  d«      dœ||<   |j                  d| j                  › d�«      }	|	€ŒÍ||   d   }
|
t        k(  r,| j                  |	j                  j                  «          ||<   �Œ
 |
|	j                  «      ||<   �Œ! ||fS )z4Extracts all the keys and key defaults from the xml.r  z}keyrš   r�   rœ   zyfiles.typerE   r,   zNo key type for id z. Using stringzUnknown key for id ú.r›   )r“   r’   r›   z}defaultr’   )r  rv   r²   r,  r-  r3   r4   rc   r  rQ   r{   r    rK  )rd   r¼   r"  Úgraphml_key_defaultsr´   Úattr_idr—   Ú	attr_nameÚyfiles_typerž   rc   s              r   r  zGraphMLReader.find_graphml_keysü  sn  € àˆØ!ÐØ×&Ñ&¨¨D¯O©OÐ+<¸EÐ'BÓCó 	NˆAØ—e‘e˜D“kˆGØŸ™˜kÓ*ˆIØŸ™˜kÓ*ˆIØŸ%™% Ó.ˆKØÐ&Ø'�	Ø$�	ØÐ Ø$�	Ü—‘Ð 3°G°9¸NÐKÔLØÐ Ü×&Ñ&Ð)<¸W¸IÀQÐ'GÓHÐHà!Ø×(Ñ(¨Ñ3Ø—u‘u˜U“|ñ%ˆL˜Ñ!ð —f‘f˜r $§/¡/Ð!2°)Ð<Ó=ˆGØÑ"à*¨7Ñ3°FÑ;�Ø¤$Ò&Ø48×4EÑ4EØŸ™×*Ñ*Ó,ñ5Ð(¨Ó1ñ 5@ÀÇÁÓ4MÐ(¨Ó1ð9	Nð: Ð1Ð1Ð1r   )NNrL   )rs   rt   ru   rï   r%   rF   rŠ   r  r  r  r  r  r  r|   r   r   r   r   G  s3   „ ÙDà!$°CÈ%ó ó5ó(òTBò '<òR9óv!2r   r   )ræ   TFFN)ræ   TFN)rï   r,  Úcollectionsr   Únetworkxr3   Únetworkx.utilsr   Ú__all__r   r	   r   Ú_dispatchabler%   rF   r   r
   rA   r   ré   r"   r   r   r|   r   r   ú<module>ra     sC  ðñ)óV Ý #ã Ý $ò	€ñ ˆ1�4Ôð ØØØØò3ó ð3ñl ˆ1�4Ôð ØØØØòDó ðDðR ØØØó,(ñ^ ˆ1�4ÔØ€×Ñ˜¨TÔ2Ø!$°CÈ%ò Eó 3ó ðEðP €×Ñ˜¨TÔ2à!°ÀuòFó 3ðF÷RLñ Lô^]�Gô ]÷@?ñ ?ôB2˜ô B2ðL #€ôV2�Gõ V2r   