<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def draw(graph, fname):
 """Draw a graph and save it into a file"""

    ag = networkx.nx_agraph.to_agraph(graph)
    ag.draw(fname, prog='dot')