code: def delegate(attribute_name, method_names):
      
      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
docs: Decorator factory to delegate methods to an attribute.
  
      Decorate a class to map every method in `method_names` to the attribute `attribute_name`.