code: def test_missing_edge_attr():
      """
      If the 'edge_attr' argument is supplied but is missing from an edge in the graph,
      we should raise a KeyError
      """
      G = nx.Graph()
      G.add_edges_from([(1, 2, {"edge_attr1": "a"}), (1, 3, {})])
      pytest.raises(
          KeyError,
          nx.weisfeiler_lehman_graph_hash,
          G,
          edge_attr="edge_attr1",
      )
  
imports: import pytest
  import networkx
  from networkx.generators import directed
label_desc: Use image node_id 6 for calling a global function with example usage: test_missing_edge_attr() without return types