human
Complete the below
def extends(resources):

    ''''Use to decorate methods on classes before initialization.
    Any classes that use this must themselves be decorated with the
    @has_resource_extenders decorator to setup the __new__ method to
    actually register the instance methods after initialization.
    :param resources: Resource collection names. The decorated method will
    be registered with each resource as an extend function.
    :type resources: list of str'
    '''
 What is a the Python code you requested?
assistant
#Here is the Python code you requested.
    def decorator(method):
        _DECORATED_EXTEND_METHODS[method].extend(resources)
        return method
    return decorator