def from_graphml(cls, path): """ Hydrate an instance from a graphml file. Args: path (str) """ graph = nx.read_graphml(os.path.abspath(path)) return cls(graph)