code: def test_set_edge_attributes_ignores_extra_edges(values, name):
      """If `values` is a dict or dict-of-dicts containing edges that are not in
      G, data associate with these edges should be ignored.
      """
      G = nx.Graph([(0, 1)])
      nx.set_edge_attributes(G, values, name)
      assert G[0][1]["weight"] == 1.0
      assert (0, 2) not in G.edges
  
imports: import random
  import pytest
  import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_set_edge_attributes_ignores_extra_edges(values, name) without return types