code: def setup_class(cls):
      deg = [3, 2, 2, 1, 0]
      cls.G = havel_hakimi_graph(deg)
      cls.WG = nx.Graph(
          (u, v, {"weight": 0.5, "other": 0.3})
          for (u, v) in cls.G.edges()
      )
      cls.WG.add_node(4)
      cls.MG = nx.MultiGraph(cls.G)
  
      # Graph with clsloops
      cls.Gsl = cls.G.copy()
      for node in cls.Gsl.nodes():
          cls.Gsl.add_edge(node, node)
  
      # Graph used as an example in Sec. 4.1 of Langville and Meyer,
      # "Google's PageRank and Beyond".
      cls.DiG = nx.DiGraph()
      cls.DiG.add_edges_from(
          (
              (1, 2),
              (1, 3),
              (3, 1),
              (3, 2),
              (3, 5),
              (4, 5),
              (4, 6),
              (5, 4),
              (5, 6),
              (6, 4),
          )
      )
      cls.DiMG = nx.MultiDiGraph(cls.DiG)
      cls.DiWG = nx.DiGraph(
          (u, v, {"weight": 0.5, "other": 0.3})
          for (u, v) in cls.DiG.edges()
      )
      cls.DiGsl = cls.DiG.copy()
      for node in cls.DiGsl.nodes():
          cls.DiGsl.add_edge(node, node)
  
file_path: networkx/networkx/linalg/tests/test_laplacian.py
imports: import pytest
  import networkx
  from networkx.generators.degree_seq import havel_hakimi_graph
  from networkx.generators.expanders import margulis_gabber_galil_graph
label_desc: Use image node_id 1 for calling the TestLaplacian obj's underlying member method code with example usage: obj.setup_class(cls) without return types