class Lazyproperty: def __init__(self, func): self.func = func def __get__(self, instance, owner): print('get') # print(instance) # print(owner) if instance is None: return self res = self.func(instance) setattr(instance, self.func.__name__, res) ret…