class_docstr: Unit tests for computing measures of structural holes.
  
  The expected values for these functions were originally computed using the
  proprietary software `UCINET`_ and the free software `IGraph`_ , and then
  computed by hand to make sure that the results are correct.
  
  .. _UCINET: https://sites.google.com/site/ucinetsoftware/home
  .. _IGraph: http://igraph.org/
class_docstr_tok: ["Unit","tests","for","computing","measures","of","structural","holes",".","The","expected","values","for","these","functions","were","originally","computed","using","the","proprietary","software","`","UCINET","`","_","and","the","free","software","`","IGraph","`","_",",","and","then","computed","by","hand","to","make","sure","that","the","results","are","correct",".","..","_UCINET",":","https",":","\/\/sites.google.com\/site\/ucinetsoftware\/home","..","_IGraph",":","http",":","\/\/igraph.org\/"]
code: def setup_method(self):
      self.D = nx.DiGraph()
      self.D.add_edges_from([(0, 1), (0, 2), (1, 0), (2, 1)])
      self.D_weights = {(0, 1): 2, (0, 2): 2, (1, 0): 1, (2, 1): 1}
      # Example from http://www.analytictech.com/connections/v20(1)/holes.htm
      self.G = nx.Graph()
      self.G.add_edges_from(
          [
              ("A", "B"),
              ("A", "F"),
              ("A", "G"),
              ("A", "E"),
              ("E", "G"),
              ("F", "G"),
              ("B", "G"),
              ("B", "D"),
              ("D", "G"),
              ("G", "C"),
          ]
      )
      self.G_weights = {
          ("A", "B"): 2,
          ("A", "F"): 3,
          ("A", "G"): 5,
          ("A", "E"): 2,
          ("E", "G"): 8,
          ("F", "G"): 3,
          ("B", "G"): 4,
          ("B", "D"): 1,
          ("D", "G"): 3,
          ("G", "C"): 10,
      }
  
file_path: networkx/networkx/algorithms/tests/test_structuralholes.py
imports: import math
  import pytest
  import networkx
  from networkx.classes.tests import dispatch_interface
label_desc: Use image node_id 1 for calling the TestStructuralHoles obj's underlying member method code with example usage: obj.setup_method() without return types