def lazy_property(undecorated):
    name = '_' + undecorated.__name__
    @property
    @wraps(undecorated)
    def decorated(self):
        try:
            return getattr(self, name)
        except __HOLE__:
            v = undecorated(self)
            setattr(self, name, v)
            return v
    return decorated
dataset/ETHPy150Open samuel/kokki/kokki/system.py/lazy_property