<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delegate(attribute_name, method_names):
 """ Decorator factory to delegate methods to an attribute. Decorate a class to map every method in `method_names` to the attribute `attribute_name`. """

    call_attribute_method = partial(_call_delegated_method, attribute_name)

    def decorate(class_):
        for method in method_names:
            setattr(class_, method, partialmethod(call_attribute_method, method))

        return class_
    return decorate