code: def setup_class(cls):
      G = nx.DiGraph()
      edges = [
          (1, 2),
          (1, 3),
          # 2 is a dangling node
          (3, 1),
          (3, 2),
          (3, 5),
          (4, 5),
          (4, 6),
          (5, 4),
          (5, 6),
          (6, 4),
      ]
      G.add_edges_from(edges)
      cls.G = G
      cls.G.pagerank = dict(
          zip(
              sorted(G),
              [
                  0.03721197,
                  0.05395735,
                  0.04150565,
                  0.37508082,
                  0.20599833,
                  0.28624589,
              ],
          )
      )
      cls.dangling_node_index = 1
      cls.dangling_edges = {1: 2, 2: 3, 3: 0, 4: 0, 5: 0, 6: 0}
      cls.G.dangling_pagerank = dict(
          zip(
              sorted(G),
              [
                  0.10844518,
                  0.18618601,
                  0.0710892,
                  0.2683668,
                  0.15919783,
                  0.20671497,
              ],
          )
      )
  
imports: import random
  import pytest
  import networkx
  from networkx.classes.tests import dispatch_interface
  from networkx.algorithms.link_analysis.pagerank_alg import _pagerank_numpy, _pagerank_python, _pagerank_scipy
label_desc: Use image node_id 1 for calling the TestPageRank obj's underlying member method code with example usage: obj.setup_class(cls) without return types