def METHOD_NAME(
    lang: str,
    taxonomy: Taxonomy,
    ignore_ids: set[str],
    add_synonyms: bool,
    add_xx: bool,
    lowercase: bool,
    strip_accent: bool,
) -> list[tuple[str, str]]:
    """Extract normalized name/synonyms of all taxonomy nodes.
    This function returns a single list of
    (taxonomy node ID, normalized name string) tuples. Items are grouped by
    node ID.
    :param lang: language to use to extract nodes
    :param taxonomy: the Taxonomy to use
    :param ignore_ids: a set of node IDs to ignore
    :param add_synonyms: if True, also add synonyms, otherwise only the name
      is included
    :param add_xx: if True, add language-independent (xx) translation
    :param lowercase: if True, lowercase names/synonyms
    :param strip_accent: if True, remove accents from names/synonyms
    """
    output = []
    for node in taxonomy.iter_nodes():
        if lang not in node.names or node.id in ignore_ids:
            continue
        names = []
        if node.names[lang]:
            # Sometimes it's null
            names.append(node.names[lang])
        if add_xx and "xx" in node.names:
            names.append(node.names["xx"])
        if add_synonyms:
            names += node.synonyms.get(lang, [])
            if add_xx:
                names += node.synonyms.get("xx", [])
        names = [normalize_string(name, lowercase, strip_accent) for name in names]
        # Strip items and remove empty ones
        names = [name.strip() for name in names if name.strip()]
        # Remove duplicates, but keep original order
        output += [
            (node.id, name) for name in sorted(set(names), key=lambda x: names.index(x))
        ]
    return output