code: def test_degree_k4_nodes(self):
      G = nx.complete_graph(4)
      answer = {1: 3.0, 2: 3.0}
      nd = nx.average_neighbor_degree(G, nodes=[1, 2])
      assert nd == answer
  
file_path: networkx/networkx/algorithms/assortativity/tests/test_neighbor_degree.py
imports: import pytest
  import networkx
label_desc: Use image node_id 4 for calling the TestAverageNeighbor obj's underlying member method code with example usage: obj.test_degree_k4_nodes() without return types