def visualize(G, settings, filename="<STR_LIT>", no_graphviz=False):
error = settings["<STR_LIT:error>"]<EOL>if no_graphviz:<EOL><INDENT>write_dot_file(G, filename)<EOL>return <NUM_LIT:0><EOL><DEDENT>write_dot_file(G, "<STR_LIT>")<EOL>renderer = "<STR_LIT>"<EOL>if re.search("<STR_LIT>", filename, re.IGNORECASE):<EOL><INDENT>renderer = "<STR_LIT>"<EOL><DEDENT>elif re.search("<STR_LIT>", filename, re.IGNORECASE):<EOL><INDENT>renderer = "<STR_LIT>"<EOL><DEDENT>elif re.search("<STR_LIT>", filename, re.IGNORECASE):<EOL><INDENT>renderer = "<STR_LIT>"<EOL><DEDENT>elif re.search("<STR_LIT>", filename, re.IGNORECASE):<EOL><INDENT>renderer = "<STR_LIT>"<EOL><DEDENT>elif re.search("<STR_LIT>", filename, re.IGNORECASE):<EOL><INDENT>renderer = "<STR_LIT>"<EOL><DEDENT>elif re.search("<STR_LIT>", filename, re.IGNORECASE):<EOL><INDENT>renderer = "<STR_LIT>"<EOL><DEDENT>elif re.search("<STR_LIT>", filename, re.IGNORECASE):<EOL><INDENT>renderer = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>renderer = "<STR_LIT>"<EOL>filename += "<STR_LIT>"<EOL><DEDENT>command = "<STR_LIT>".format(renderer, filename)<EOL>p = Popen(command, shell=True)<EOL>p.communicate()<EOL>if p.returncode:<EOL><INDENT>errmes = "<STR_LIT>"<EOL>os.remove("<STR_LIT>")<EOL>error(errmes)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>os.remove("<STR_LIT>")<EOL>return <NUM_LIT:0><EOL>
Uses networkX to draw a graphviz dot file either (a) calls the
graphviz command "dot" to turn it into a SVG and remove the
dotfile (default), or (b) if no_graphviz is True, just output
the graphviz dot file

Args:
    a NetworkX DiGraph
    the settings dictionary
    a filename (a default is provided
    a flag indicating whether graphviz should *not* be called

Returns:
    0 if everything worked
    will cause fatal error on failure