Outputs the graph using the graphviz "dot" format.

def dot_format(out, graph, name="digraph"):
    """Outputs the graph using the graphviz "dot" format."""

    out.write("digraph %s {\n" % name)
    for step, deps in each_step(graph):
        for dep in deps:
            out.write("  \"%s\" -> \"%s\";\n" % (step, dep))

    out.write("}\n")