def __get__(self, instance, cls):
    val = self.function(instance)
    setattr(instance, self.function.__name__, val)
    return val
def __get__(self, instance, cls):
    val = self.function(instance)
    setattr(instance, self.function.__name__, val)
    return val