code: def test_katz_centrality_weighted(self):
      G = self.G
      alpha = self.G.alpha
      p = nx.katz_centrality_numpy(G, alpha, weight="weight")
      for a, b in zip(list(p.values()), self.G.evc):
          assert a == pytest.approx(b, abs=1e-7)
  
imports: import math
  import pytest
  import networkx
label_desc: Use image node_id 2 for calling the TestKatzCentralityDirectedNumpy obj's underlying member method code with example usage: obj.test_katz_centrality_weighted() without return types