sorting out the write_graphml