def METHOD_NAME() -> int:
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "infile", nargs="?", type=argparse.FileType("r"), default=sys.stdin
    )
    parser.add_argument(
        "outfile", nargs="?", type=argparse.FileType("w"), default=sys.stdout
    )
    parser.add_argument(
        "--add-record-num", dest="add_record_num", action="store_true", default=False
    )
    parser.add_argument(
        "--convert-number", dest="convert_number", action="store_true", default=False
    )
    args = parser.parse_args()
    trace_contents = json.load(args.infile)
    normal = Normalizer(trace_contents["globalObjID"], args.convert_number)
    def stripTime(rec):
        del rec["time"]
        return rec
    trace_contents["trace"] = [
        normal.normalize_rec(stripTime(rec)) for rec in trace_contents["trace"]
    ]
    if args.add_record_num:
        # Add a globalRecordNum key for easier searching for a particular record.
        for globalRecordNum, rec in enumerate(trace_contents["trace"]):
            rec["globalRecordNum"] = globalRecordNum
    trace_contents["globalObjID"] = 0
    json.dump(trace_contents, args.outfile, indent=4)
    return 0