def export_memory_graph(filename, graph): nx.write_dot(graph, '{}.dot'.format(filename)) logging.debug('{}.dot created'.format(filename))