def METHOD_NAME(pattern, node, context):
    if (not isinstance(pattern, Object) and
            not issubclass(node.__class__, pattern.__class__.get_adaptee())):
        return None
    for field_name, field_value in pattern:
        node_value = getattr(node, field_name)
        if isinstance(field_value, MatchNode):
            m = _match(field_value, node_value, context)
            if not m:
                return None
        else:
            if (
                    isinstance(field_value, collections.abc.Container) and
                    not isinstance(field_value, str)):
                if len(field_value) != len(node_value):
                    return None
                for cfv, cnv in zip(field_value, node_value):
                    if isinstance(cfv, (MatchNode, MatchASTNode)):
                        m = _match(cfv, cnv, context)
                        if not m:
                            return None
                    else:
                        if cfv != cnv:
                            return None
            elif isinstance(field_value, (MatchNode, MatchASTNode, Object)):
                m = METHOD_NAME(field_value, node_value, context)
                if not m:
                    return None
            else:
                if field_value != node_value:
                    return None
    return True