<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fromovl(args):
 """ %prog graph nucmer2ovl.ovl fastafile Build overlap graph from ovl file which is converted using NUCMER2OVL. """

    p = OptionParser(fromovl.__doc__)
    opts, args = p.parse_args(args)

    if len(args) != 2:
        sys.exit(not p.print_help())

    ovlfile, fastafile = args
    ovl = OVL(ovlfile)
    g = ovl.graph

    fw = open("contained.ids", "w")
    print("\n".join(sorted(ovl.contained)), file=fw)

    graph_to_agp(g, ovlfile, fastafile, exclude=ovl.contained, verbose=False)