code: def test_hits(self, hits_alg):
      G = self.G
      h, a = hits_alg(G, tol=1.0e-08)
      for n in G:
          assert h[n] == pytest.approx(G.h[n], abs=1e-4)
      for n in G:
          assert a[n] == pytest.approx(G.a[n], abs=1e-4)
      nstart = {i: 1.0 / 2 for i in G}
      h, a = hits_alg(G, nstart=nstart)
      for n in G:
          assert h[n] == pytest.approx(G.h[n], abs=1e-4)
      for n in G:
          assert a[n] == pytest.approx(G.a[n], abs=1e-4)
  
file_path: networkx/networkx/algorithms/link_analysis/tests/test_hits.py
imports: import pytest
  import networkx
  from networkx.algorithms.link_analysis.hits_alg import _hits_numpy, _hits_python, _hits_scipy
label_desc: Use image node_id 3 for calling the TestHITS obj's underlying member method code with example usage: obj.test_hits(hits_alg) without return types