def METHOD_NAME():
    # check if we are in grass
    gisbase = os.getenv("GISBASE")
    if not gisbase:
        grass.fatal(_("$GISBASE not defined"))
        return 0
    # check if shell script output is required
    if flags["g"]:
        shell = True
        err = 0
        good = 1
    else:
        shell = False
        err = _("The two maps are different")
        good = _("The two maps are identical")
    # options
    typ = options["type"]
    ainp = checkfile(options["ainput"], typ, shell)
    binp = checkfile(options["binput"], typ, shell)
    variables = grass.core.gisenv()
    # files to investigate to check identity
    # for now color2 is ignored
    raster_folder = ["cats", "cell", "cellhd", "cell_misc", "fcell", "colr", "hist"]
    if flags["c"]:
        raster_folder.remove("colr")
    vector_folder = ["coor", "head", "topo"]
    if flags["t"]:
        vector_folder.remove("topo")
    # path to the mapsets
    aloc = os.path.join(
        variables["GISDBASE"], variables["LOCATION_NAME"], ainp["mapset"]
    )
    bloc = os.path.join(
        variables["GISDBASE"], variables["LOCATION_NAME"], binp["mapset"]
    )
    # variable for color table
    md5color = 1
    # start analysis for raster
    if typ == "raster":
        # for each folder
        for fold in raster_folder:
            # create the path to folder
            apath = os.path.join(aloc, fold, ainp["name"])
            bpath = os.path.join(bloc, fold, binp["name"])
            # if folder is cell_misc it check the into files inside cell_misc folder
            if fold == "cell_misc":
                adirlist = os.listdir(apath)
                bdirlist = os.listdir(bpath)
                # if the files are the same check md5sum for each file
                if adirlist == bdirlist:
                    for i in adirlist:
                        apath = os.path.join(apath, i)
                        bpath = os.path.join(bpath, i)
                        if not checkmd5(apath, bpath, shell):
                            grass.message(err)
                            return
                # if the files are different return false
                else:
                    grass.message(err)
                    return
            # check md5sum for each file
            else:
                if not checkmd5(apath, bpath, shell):
                    grass.message(err)
                    return
        grass.message(good)
        return
    # start analysis for vector
    elif typ == "vector":
        for fold in vector_folder:
            apath = os.path.join(aloc, "vector", ainp["name"], fold)
            bpath = os.path.join(bloc, "vector", binp["name"], fold)
            if not checkmd5(apath, bpath, shell):
                grass.message(err)
                return
        grass.message(good)
        return