code: def test_key_error(self):
      graph = two_node_graph()
      with pytest.raises(KeyError):
          nx.algorithms.max_weight_clique(graph, "nonexistent-key")
  
file_path: networkx/networkx/algorithms/tests/test_max_weight_clique.py
imports: import pytest
  import networkx
label_desc: Use image node_id 2 for calling the TestMaximumWeightClique obj's underlying member method code with example usage: obj.test_key_error() without return types