code: def get_cache_dir(subdir=None):
      """
      Function for getting cache directory to store reused files like kernels, or scratch space
      for autotuning, etc.
      """
      cache_dir = os.environ.get("NEON_CACHE_DIR")
  
      if cache_dir is None:
          cache_dir = appdirs.user_cache_dir("neon", "neon")
  
      if subdir:
          subdir = subdir if isinstance(subdir, list) else [subdir]
          cache_dir = os.path.join(cache_dir, *subdir)
  
      if not os.path.exists(cache_dir):
          os.makedirs(cache_dir)
  
      return cache_dir
  
file_path: neon/neon/util/persist.py
imports: import importlib
  import logging
  import os
  import pkgutil
  import sys
  import appdirs
  from neon.util.compat import pickle, pickle_load
label_desc: Use image node_id 1 for calling a global function with example usage: get_cache_dir(subdir) and returns: cache_dir