def __get__(self, instance: Optional[T], owner: Type[T]) -> Any:
    if (instance is None):
        return self
    try:
        return getattr(instance, self.name)
    except AttributeError:
        value = self.function(instance)
        setattr(instance, self.name, value)
        return value
def __get__(self, instance: Optional[T], owner: Type[T]) -> Any:
    if (instance is None):
        return self
    try:
        return getattr(instance, self.name)
    except AttributeError:
        value = self.function(instance)
        setattr(instance, self.name, value)
        return value