def METHOD_NAME(maps, outputMap):
    labels = ["_".join(m.split("_")[1:]) for m in maps]
    labels = list(set(labels))
    for l in labels:
        print("mapping %s rule" % str(l))
        map_synth = []
        for m in maps:
            if l == "_".join(m.split("_")[1:]):
                map_synth.append(m)
        if len(map_synth) > 1:
            grass.run_command(
                "r.patch", overwrite="True", input=(",".join(map_synth)), output=l
            )
        else:
            grass.run_command("g.copy", raster=(str(map_synth), l))
        grass.run_command(
            "r.to.vect", overwrite="True", flags="s", input=l, output=l, feature="area"
        )
        grass.run_command("v.db.addcol", map=l, columns="rule varchar(25)")
        grass.run_command("v.db.update", map=l, column="rule", value=l)
        grass.run_command("v.db.update", map=l, column="label", value=l)
    mapstring = ",".join(labels)
    if len(maps) > 1:
        grass.run_command(
            "v.patch", overwrite="True", flags="e", input=mapstring, output=outputMap
        )
    else:
        grass.run_command("g.copy", vector=(mapstring, outputMap))