code: def updatable_map(cache: MutableMapping[Domain, Range]) -> Operator[Map]:
      
  
      def wrapper(function: Map[Domain, Range]) -> Map[Domain, Range]:
          @wraps(function)
          def wrapped(argument: Domain) -> Range:
              try:
                  return cache[argument]
              except KeyError:
                  result = function(argument)
                  cache[argument] = result
                  return result
  
          return wrapped
  
      return wrapper
docs: Returns decorator that calls wrapped function
      if nothing was found in cache for its argument
      and reuses result afterwards.
  
      Wrapped function arguments should be hashable.