class_docstr: Matches a node against a pattern represented by a node.
class_docstr_tok: ["Matches","a","node","against","a","pattern","represented","by","a","node","."]
code: def generic_visit(self, node):
      if not self.matches:
          return
  
      pattern = self.pattern
      for f in node._fields:
          if f.startswith("__"):
              continue
  
          if not hasattr(node, f):
              if hasattr(pattern, f) and getattr(pattern, f):
                  return self.no_match()
              else:
                  continue
          if not hasattr(pattern, f):
              return self.no_match()
  
          v = getattr(node, f)
          p = getattr(pattern, f)
  
          if self.is_wildcard(p):
              continue
          if isinstance(v, (list, tuple)):
              if not isinstance(p, (list, tuple)) or len(v) != len(p):
                  return self.no_match()
              for v_item, p_item in zip(v, p):
                  self.compare_and_visit(v_item, p_item)
          elif isinstance(v, (gast.AST, ast.AST)):
              if not isinstance(v, type(p)) and not isinstance(
                  p, type(v)
              ):
                  return self.no_match()
              self.compare_and_visit(v, p)
          else:
              # Assume everything else is a value type.
              if v != p:
                  return self.no_match()
  
imports: import ast
  import gast
  from tensorflow.python.autograph.pyct import anno
  from tensorflow.python.autograph.pyct import parser
  from tensorflow.python.autograph.pyct import qual_names
label_desc: Use image node_id 5 for calling the PatternMatcher obj's underlying member method code with example usage: obj.generic_visit(node) and returns: self, self, self, self, self