class_docstr: Tests for bipartite matching algorithms.
class_docstr_tok: ["Tests","for","bipartite","matching","algorithms","."]
docstr: Creates a bipartite graph for use in testing matching algorithms.
  
  The bipartite graph has a maximum cardinality matching that leaves
  vertex 1 and vertex 10 unmatched. The first six numbers are the left
  vertices and the next six numbers are the right vertices.
docstr_tok: ["Creates","a","bipartite","graph","for","use","in","testing","matching","algorithms",".","The","bipartite","graph","has","a","maximum","cardinality","matching","that","leaves","vertex","1","and","vertex","10","unmatched",".","The","first","six","numbers","are","the","left","vertices","and","the","next","six","numbers","are","the","right","vertices","."]
code: def setup_method(self):
      """Creates a bipartite graph for use in testing matching algorithms.
  
      The bipartite graph has a maximum cardinality matching that leaves
      vertex 1 and vertex 10 unmatched. The first six numbers are the left
      vertices and the next six numbers are the right vertices.
  
      """
      self.simple_graph = nx.complete_bipartite_graph(2, 3)
      self.simple_solution = {0: 2, 1: 3, 2: 0, 3: 1}
  
      edges = [
          (0, 7),
          (0, 8),
          (2, 6),
          (2, 9),
          (3, 8),
          (4, 8),
          (4, 9),
          (5, 11),
      ]
      self.top_nodes = set(range(6))
      self.graph = nx.Graph()
      self.graph.add_nodes_from(range(12))
      self.graph.add_edges_from(edges)
  
      # Example bipartite graph from issue 2127
      G = nx.Graph()
      G.add_nodes_from(
          [
              (1, "C"),
              (1, "B"),
              (0, "G"),
              (1, "F"),
              (1, "E"),
              (0, "C"),
              (1, "D"),
              (1, "I"),
              (0, "A"),
              (0, "D"),
              (0, "F"),
              (0, "E"),
              (0, "H"),
              (1, "G"),
              (1, "A"),
              (0, "I"),
              (0, "B"),
              (1, "H"),
          ]
      )
      G.add_edge((1, "C"), (0, "A"))
      G.add_edge((1, "B"), (0, "A"))
      G.add_edge((0, "G"), (1, "I"))
      G.add_edge((0, "G"), (1, "H"))
      G.add_edge((1, "F"), (0, "A"))
      G.add_edge((1, "F"), (0, "C"))
      G.add_edge((1, "F"), (0, "E"))
      G.add_edge((1, "E"), (0, "A"))
      G.add_edge((1, "E"), (0, "C"))
      G.add_edge((0, "C"), (1, "D"))
      G.add_edge((0, "C"), (1, "I"))
      G.add_edge((0, "C"), (1, "G"))
      G.add_edge((0, "C"), (1, "H"))
      G.add_edge((1, "D"), (0, "A"))
      G.add_edge((1, "I"), (0, "A"))
      G.add_edge((1, "I"), (0, "E"))
      G.add_edge((0, "A"), (1, "G"))
      G.add_edge((0, "A"), (1, "H"))
      G.add_edge((0, "E"), (1, "G"))
      G.add_edge((0, "E"), (1, "H"))
      self.disconnected_graph = G
  
imports: import itertools
  import pytest
  import networkx
  from networkx.algorithms.bipartite.matching import eppstein_matching, hopcroft_karp_matching, maximum_matching, minimum_weight_full_matching, to_vertex_cover
label_desc: Use image node_id 1 for calling the TestMatching obj's underlying member method code with example usage: obj.setup_method() without return types