def set_edge_attributes(G, name, values):
    # Treat `value` as the attribute value for each node.
    if not isinstance(values, dict):
        if G.is_multigraph():
            edges = G.edges(keys=True)
        else:
            edges = G.edges()
        values = dict(zip_longest(edges, [], fillvalue=values))

    if G.is_multigraph():
        for (u, v, key), value in values.items():
            G[u][v][key][name] = value
    else:
        for (u, v), value in values.items():
            G[u][v][name] = value
Fallback just plays an alert.
dataset/ETHPy150Open networkx/networkx/networkx/classes/function.py/set_edge_attributes--crossover with--dataset/ETHPy150Open facelessuser/SubNotify/lib/notify/__init__.py/NotifyFallback.Show