class_docstr: Internal representation of state for the DiGraphMatcher class.
  
  This class is used internally by the DiGraphMatcher class.  It is used
  only to store state specific data. There will be at most G2.order() of
  these objects in memory at a time, due to the depth-first search
  strategy employed by the VF2 algorithm.
class_docstr_tok: ["Internal","representation","of","state","for","the","DiGraphMatcher","class",".","This","class","is","used","internally","by","the","DiGraphMatcher","class",".","It","is","used","only","to","store","state","specific","data",".","There","will","be","at","most","G2.order","(",")","of","these","objects","in","memory","at","a","time",",","due","to","the","depth-first","search","strategy","employed","by","the","VF2","algorithm","."]
docstr: Deletes the DiGMState object and restores the class variables.
docstr_tok: ["Deletes","the","DiGMState","object","and","restores","the","class","variables","."]
code: def restore(self):
      """Deletes the DiGMState object and restores the class variables."""
  
      # First we remove the node that was added from the core vectors.
      # Watch out! G1_node == 0 should evaluate to True.
      if self.G1_node is not None and self.G2_node is not None:
          del self.GM.core_1[self.G1_node]
          del self.GM.core_2[self.G2_node]
  
      # Now we revert the other four vectors.
      # Thus, we delete all entries which have this depth level.
      for vector in (
          self.GM.in_1,
          self.GM.in_2,
          self.GM.out_1,
          self.GM.out_2,
      ):
          for node in list(vector.keys()):
              if vector[node] == self.depth:
                  del vector[node]
  
imports: import sys
label_desc: Use image node_id 2 for calling the DiGMState obj's underlying member method code with example usage: obj.restore() without return types