def METHOD_NAME():
    options, flags = gs.parser()
    original = options["input"]
    output = options["output"]
    cats = options["cats"]
    rules = parse(original, cats)
    if flags["c"] and flags["s"]:
        gs.warning(_("The extent of the output reclassified raster cannot be changed"))
    if flags["s"]:
        reclass(original, output, rules)
    else:
        output_tmp = append_random("tmp", 8)
        TMP.append(output_tmp)
        reclass(original, output_tmp, rules)
        if flags["c"]:
            gs.use_temp_region()
            atexit.register(gs.del_temp_region)
            gs.run_command("g.region", zoom=output_tmp)
        gs.mapcalc(output + " = " + output_tmp)
    gs.run_command("r.colors", map=output, raster=original, quiet=True)
    gs.raster_history(output)