code: def _memo(f):
      
      memos = {}
      def memoized(*args):
          try: return memos[args]
          except KeyError:
              result = memos[args] = f(*args)
              return result
      return memoized
docs: Return a function like f but caching its results. Its arguments
      must be hashable.