code: def test_bal_tree(self):
      c = harmonic_centrality(self.T)
      d = {
          0: 4.0,
          1: 4.1666,
          2: 4.1666,
          3: 2.8333,
          4: 2.8333,
          5: 2.8333,
          6: 2.8333,
      }
      for n in sorted(self.T):
          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 7 for calling the TestClosenessCentrality obj's underlying member method code with example usage: obj.test_bal_tree() without return types