code: def test_invalid_undirected_graph(self):
      G = nx.Graph()
      with pytest.raises(nx.NetworkXError):
          nx.average_degree_connectivity(G, target="bogus")
      with pytest.raises(nx.NetworkXError):
          nx.average_degree_connectivity(G, source="bogus")
  
file_path: networkx/networkx/algorithms/assortativity/tests/test_connectivity.py
imports: from itertools import permutations
  import pytest
  import networkx
label_desc: Use image node_id 9 for calling the TestNeighborConnectivity obj's underlying member method code with example usage: obj.test_invalid_undirected_graph() without return types