call the function self.func with an argument instance, substitute the result for res and value under the self.name key of the instance.__dict__ dictionary.
res = instance . __dict__ [ self . name ] = self . func ( instance )