code: def simple_memoize(callable_object):
      
  
      cache = dict()
  
      def wrapper(*rest):
          if rest not in cache:
              cache[rest] = callable_object(*rest)
          return cache[rest]
  
      return wrapper
docs: Simple memoization for functions without keyword arguments.
  
      This is useful for mapping code objects to module in this context.
      inspect.getmodule() requires a number of system calls, which may slow down
      the tracing considerably. Caching the mapping from code objects (there is
      *one* code object for each function, regardless of how many simultaneous
      activations records there are).
  
      In this context we can ignore keyword arguments, but a generic memoizer
      ought to take care of that as well.