def write_dot (graph, ranks, path="<STR_LIT>"):
dot = Digraph()<EOL>for node in graph.nodes():<EOL><INDENT>dot.node(node, "<STR_LIT>" % (node, ranks[node]))<EOL><DEDENT>for edge in graph.edges():<EOL><INDENT>dot.edge(edge[<NUM_LIT:0>], edge[<NUM_LIT:1>], constraint="<STR_LIT:false>")<EOL><DEDENT>with open(path, '<STR_LIT:w>') as f:<EOL><INDENT>f.write(dot.source)<EOL><DEDENT>
output the graph in Dot file format