code: def test_load_betweenness_difference(self):
      # Difference Between Load and Betweenness
      # --------------------------------------- The smallest graph
      # that shows the difference between load and betweenness is
      # G=ladder_graph(3) (Graph B below)
  
      # Graph A and B are from Tao Zhou, Jian-Guo Liu, Bing-Hong
      # Wang: Comment on "Scientific collaboration
      # networks. II. Shortest paths, weighted networks, and
      # centrality". https://arxiv.org/pdf/physics/0511084
  
      # Notice that unlike here, their calculation adds to 1 to the
      # betweenness of every node i for every path from i to every
      # other node.  This is exactly what it should be, based on
      # Eqn. (1) in their paper: the eqn is B(v) = \sum_{s\neq t,
      # s\neq v}{\frac{\sigma_{st}(v)}{\sigma_{st}}}, therefore,
      # they allow v to be the target node.
  
      # We follow Brandes 2001, who follows Freeman 1977 that make
      # the sum for betweenness of v exclude paths where v is either
      # the source or target node.  To agree with their numbers, we
      # must additionally, remove edge (4,8) from the graph, see AC
      # example following (there is a mistake in the figure in their
      # paper - personal communication).
  
      # A = nx.Graph()
      # A.add_edges_from([(0,1), (1,2), (1,3), (2,4),
      #                  (3,5), (4,6), (4,7), (4,8),
      #                  (5,8), (6,9), (7,9), (8,9)])
      B = nx.Graph()  # ladder_graph(3)
      B.add_edges_from(
          [(0, 1), (0, 2), (1, 3), (2, 3), (2, 4), (4, 5), (3, 5)]
      )
      c = nx.load_centrality(B, normalized=False)
      d = {0: 1.750, 1: 1.750, 2: 6.500, 3: 6.500, 4: 1.750, 5: 1.750}
      for n in sorted(B):
          assert c[n] == pytest.approx(d[n], abs=1e-3)
  
imports: import pytest
  import networkx
label_desc: Use image node_id 15 for calling the TestLoadCentrality obj's underlying member method code with example usage: obj.test_load_betweenness_difference() without return types