def METHOD_NAME(addons):
    """Find correct addon name if addon is a multi-addon
    e.g. wx.metadata contains multiple modules g.gui.cswbrowser etc.
    Examples:
    - for the g.gui.cswbrowser module the wx.metadata addon name is
    returned
    - for the i.sentinel.download module the i.sentinel addon name is
    returned
    etc.
    :param list addons: list of individual addon modules to be reinstalled
    :return set result: set of unique addon names to be reinstalled
    """
    grass_version = os.getenv("GRASS_VERSION", "unknown")
    if grass_version != "unknown":
        major, minor, patch = grass_version.split(".")
    else:
        gscript.fatal(_("Unable to get GRASS GIS version."))
    url = "https://grass.osgeo.org/addons/grass{major}/modules.xml".format(
        major=major,
    )
    response = download_modules_xml_file(
        url=url,
        response_format="application/xml",
    )
    tree = etree.fromstring(response.read())
    result = []
    for addon in addons:
        found = False
        addon_pattern = re.compile(r".*{}$".format(addon))
        for i in tree:
            for f in i.findall(".//binary/file"):
                if re.match(addon_pattern, f.text):
                    result.append(i.attrib["name"])
                    found = True
                    break
        if not found:
            gscript.warning(
                _(
                    "The <{}> addon cannot be reinstalled. "
                    "Addon wasn't found among the official "
                    "addons.".format(addon)
                ),
            )
    return set(result)