def memoize(f):
    cache= {}
    def memf(*x):
        if x not in cache:
            cache[x] = f(*x)
        return cache[x]
    return memf
Test if it prints the NPM cache path.
dataset/ETHPy150Open packages/psutil/psutil/_common.py/memoize--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/npm_test.py/NpmTestCase.test_cache_path