def METHOD_NAME(network, outdir, dotFilename):
    callgraph = pydot.Dot(graph_type="graph", rankdir="LR")
    _dot_create(network, callgraph)
    dot_filename = os.path.join(outdir, dotFilename)
    callgraph.write(dot_filename)
    try:
        # dot crashes if the figure is extremely wide.
        # So avoid terminating simulation unnecessarily
        callgraph.write_svg(dot_filename + ".svg", prog="neato")
        callgraph.write_pdf(dot_filename + ".pdf", prog="neato")
    except:
        warn("failed to generate dot output from %s", dot_filename)