<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_is_view_attribute(parents, attrs):
 """Generates is_X_attribute function for given parents and attrs."""

    def is_attribute(node):
        return _attribute_is_magic(node, attrs, parents)
    return is_attribute