code: def cached_function(f):
      cache = {}
      _function_caches.append(cache)
      uncomputed = object()
  
      def wrapper(*args):
          res = cache.get(args, uncomputed)
          if res is uncomputed:
              res = cache[args] = f(*args)
          return res
  
      wrapper.uncached = f
      return wrapper
  
imports: from __future__ import absolute_import
  import os
  import sys
  import re
  import io
  import codecs
  import shutil
  import tempfile
  from contextlib import contextmanager
label_desc: Use image node_id 2 for calling a global function with example usage: cached_function(f) and returns: wrapper, res