code: def _cache(f):
      cache = dict()
  
      def wrapper(*args):
          key = (args, _executing_eagerly())
  
          if key in cache:
              return cache[key]
          else:
              retval = f(*args)
              cache[key] = retval
              return retval
  
      return wrapper
  
imports: from distutils.version import LooseVersion
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: _cache(f) and returns: wrapper, cache, retval