class_docstr: Implementation of VF2 algorithm for matching undirected graphs.
  
  Suitable for Graph and MultiGraph instances.
class_docstr_tok: ["Implementation","of","VF2","algorithm","for","matching","undirected","graphs",".","Suitable","for","Graph","and","MultiGraph","instances","."]
docstr: Initialize GraphMatcher.
  
  Parameters
  ----------
  G1,G2: NetworkX Graph or MultiGraph instances.
     The two graphs to check for isomorphism or monomorphism.
  
  Examples
  --------
  To create a GraphMatcher which checks for syntactic feasibility:
  
  >>> from networkx.algorithms import isomorphism
  >>> G1 = nx.path_graph(4)
  >>> G2 = nx.path_graph(4)
  >>> GM = isomorphism.GraphMatcher(G1, G2)
docstr_tok: ["Initialize","GraphMatcher",".","Parameters","--","--","--","--","--","G1",",","G2",":","NetworkX","Graph","or","MultiGraph","instances",".","The","two","graphs","to","check","for","isomorphism","or","monomorphism",".","Examples","--","--","--","--","To","create","a","GraphMatcher","which","checks","for","syntactic","feasibility",":",">",">",">","from","networkx.algorithms","import","isomorphism",">",">",">","G1","=","nx.path_graph","(","4",")",">",">",">","G2","=","nx.path_graph","(","4",")",">",">",">","GM","=","isomorphism.GraphMatcher","(","G1",",","G2",")"]
code: def __init__(self, G1, G2):
      """Initialize GraphMatcher.
  
      Parameters
      ----------
      G1,G2: NetworkX Graph or MultiGraph instances.
         The two graphs to check for isomorphism or monomorphism.
  
      Examples
      --------
      To create a GraphMatcher which checks for syntactic feasibility:
  
      >>> from networkx.algorithms import isomorphism
      >>> G1 = nx.path_graph(4)
      >>> G2 = nx.path_graph(4)
      >>> GM = isomorphism.GraphMatcher(G1, G2)
      """
      self.G1 = G1
      self.G2 = G2
      self.G1_nodes = set(G1.nodes())
      self.G2_nodes = set(G2.nodes())
      self.G2_node_order = {n: i for i, n in enumerate(G2)}
  
      # Set recursion limit.
      self.old_recursion_limit = sys.getrecursionlimit()
      expected_max_recursion_level = len(self.G2)
      if self.old_recursion_limit < 1.5 * expected_max_recursion_level:
          # Give some breathing room.
          sys.setrecursionlimit(int(1.5 * expected_max_recursion_level))
  
      # Declare that we will be searching for a graph-graph isomorphism.
      self.test = "graph"
  
      # Initialize state
      self.initialize()
  
imports: import sys
label_desc: Use image node_id 1 to create a new GraphMatcher object  with example: obj = GraphMatcher(G1, G2)