<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generic_visit(self, pattern):
 """ Check if the pattern match with the checked node. a node match if: - type match - all field match """

        return (isinstance(pattern, type(self.node)) and
                all(self.field_match(value, getattr(pattern, field))
                    for field, value in iter_fields(self.node)))