code: def test_p3_harmonic(self):
      c = harmonic_centrality(self.P3)
      d = {0: 1.5, 1: 2, 2: 1.5}
      for n in sorted(self.P3):
          assert c[n] == pytest.approx(d[n], abs=1e-3)
  
file_path: networkx/networkx/algorithms/centrality/tests/test_harmonic_centrality.py
imports: import pytest
  import networkx
  from networkx.algorithms.centrality import harmonic_centrality
label_desc: Use image node_id 2 for calling the TestClosenessCentrality obj's underlying member method code with example usage: obj.test_p3_harmonic() without return types