code: def test_degree_centrality_1(self):
      d = nx.degree_centrality(self.K5)
      exact = dict(zip(range(5), [1] * 5))
      for n, dc in d.items():
          assert exact[n] == pytest.approx(dc, abs=1e-7)
  
file_path: networkx/networkx/algorithms/centrality/tests/test_degree_centrality.py
imports: import pytest
  import networkx
label_desc: Use image node_id 2 for calling the TestDegreeCentrality obj's underlying member method code with example usage: obj.test_degree_centrality_1() without return types