code: def generic_visit(self, pattern):
          
          return (isinstance(pattern, type(self.node)) and
                  all(self.field_match(value, getattr(pattern, field))
                      for field, value in iter_fields(self.node)))
docs: Check if the pattern match with the checked node.
  
          a node match if:
              - type match
              - all field match