def simplify_edge_attribute_name(G, key, name_list, simple_name):
    """
    Simplify an arbitrary list of name values for a given key into one.

    Parameters
    ----------
    G : networkx Graph/DiGraph/MultiGraph/MultiDiGraph/...
        Graph where we want to simplify an attribute.
    key : str
        Name of the edges' attributes.
    name_list : list
        List of values for the given attribute we want to merge into one.
    simple_name : str
        Name for the fusion of every values in the given list.

    Returns
    -------
    G : networkx Graph/DiGraph/MultiGraph/MultiDiGraph/...
        Graph with the modified attribute.

    """
    G = G.copy()
    for edge in G.edges:
        if key in list(G.edges[edge].keys()):
            if G.edges[edge][key] in name_list:
                G.edges[edge][key] = simple_name
    return G