code: def memoize(func):
    
    class Memoizer(dict):
      def __missing__(self, args):
        val = func(*args)
        self[args] = val
        return val
    memory = Memoizer()
    @wraps(func)
    def wrapper(*args):
      return memory[args]
    return wrapper
docs: Decorator for unerasable memoization based on function arguments, for
    functions without keyword arguments.