def METHOD_NAME():
    try:
        depsfile = open("widget.deps", "w")
    except Exception as err:
        print("Error: %s" % str(err), file=sys.stderr)
        sys.exit(1)
    try:
        revfile = open("widget_reverse.deps", "w")
    except Exception as err:
        print("Error: %s" % str(err), file=sys.stderr)
        sys.exit(1)
    fwd = dict()
    for ii in dep_map:
        if ii.widget in fwd:
            continue
        fwd.update({
            ii.widget: [jj.dep for jj in dep_map if jj.widget == ii.widget]
        })
    json.dump(fwd, depsfile, indent=4)
    rev = dict()
    for ii in dep_map:
        if ii.dep in rev:
            continue
        rev.update({
            ii.dep: [
                list([jj.widget, jj.enable, jj.die, jj.hide])
                for jj in dep_map if ii.dep == jj.dep
            ]
        })
    json.dump(rev, revfile, indent=4)