code: def memoize(self, hasher=None):
          
          ns = self.Namespace()
          ns.memo = {}
          if hasher is None:
              hasher = lambda x: x
  
          def memoized(*args, **kwargs):
              key = hasher(*args)
              if key not in ns.memo:
                  ns.memo[key] = self.obj(*args, **kwargs)
              return ns.memo[key]
  
          return self._wrap(memoized)
docs: Memoize an expensive function by storing its results.