human
Complete this python program:
def cached_property(fun):
assistant
#Here is the Python program you requested.

    """A memoize decorator for class properties.
    """
    @wraps(fun)
    def get(self):
        try:
            return self._cache[fun]
        except AttributeError:
            self._cache = {}
        except KeyError:
            pass
        ret = self._cache[fun] = fun(self)
        return ret
    return property(get)