

def __call__(self, *args):
    if (not isinstance(args, collections.Hashable)):
        return self.func(*args)
    if (args in self.cache):
        return self.cache[args]
    else:
        value = self.func(*args)
        self.cache[args] = value
        return value

dataset/ETHPy150Open ngsutils/ngsutils/ngsutils/support/ngs_utils.py memoize.__call__/original