def memoize(function):
    cache = {}

    def decorated_function(*args):
        try:
            return cache[args]
        except __HOLE__:
            val = function(*args)
            cache[args] = val
            return val
    return decorated_function
dataset/ETHPy150Open jborg/attic/attic/helpers.py/memoize