<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def attr_descriptor(action, *names):
 """ Wrap a function that allows for getting or setting of an attribute. This allows for specific handling of an attribute when it comes to serializing and deserializing. :param action: The AttributeActions that this descriptor performs :param names: A list of names of the attributes this references """

    if isinstance(action, AttributeActions):
        action = [action]

    def wrapped(fn):
        if not hasattr(fn, '__jsonapi_action__'):
            fn.__jsonapi_action__ = set()
            fn.__jsonapi_desc_for_attrs__ = set()
        fn.__jsonapi_desc_for_attrs__ |= set(names)
        fn.__jsonapi_action__ |= set(action)
        return fn

    return wrapped