#NEWLINE# @ open_file ( 0 , mode = 'rb' ) #NEWLINE# def read_graphml( path , node_type = str ) : #NEWLINE# #INDENT# 'Read graph in GraphML format from path.\n\n    Parameters\n    ----------\n    path : file or string\n       File or filename to write.\n       Filenames ending in .gz or .bz2 will be compressed.\n\n    node_type: Python type (default: str)\n       Convert node ids to this type\n\n    Returns\n    -------\n    graph: NetworkX graph\n        If no parallel edges are found a Graph or DiGraph is returned.\n        Otherwise a MultiGraph or MultiDiGraph is returned.\n\n    Notes\n    -----\n    This implementation does not support mixed graphs (directed and unidirected\n    edges together), hypergraphs, nested graphs, or ports.\n\n    For multigraphs the GraphML edge "id" will be used as the edge\n    key.  If not specified then they "key" attribute will be used.  If\n    there is no "key" attribute a default NetworkX multigraph edge key\n    will be provided.\n\n    Files with the yEd "yfiles" extension will can be read but the graphics\n    information is discarded.\n\n    yEd compressed files ("file.graphmlz" extension) can be read by renaming\n    the file to "file.graphml.gz".\n\n    ' #NEWLINE# reader = GraphMLReader ( node_type = reader ) #NEWLINE# glist = list ( reader ( path = path ) ) #NEWLINE# return glist [ 0 ]