code: def set_cache_dir(cache_dir):
      """Set the directory to be used for temporary file storage.
  
      This directory is used by joblib to store memmapped arrays,
      which reduces memory requirements and speeds up parallel
      computation.
  
      Parameters
      ----------
      cache_dir : str or None
          Directory to use for temporary file storage. None disables
          temporary file storage.
      """
      if cache_dir is not None and not op.exists(cache_dir):
          raise OSError("Directory %s does not exist" % cache_dir)
  
      set_config("MNE_CACHE_DIR", cache_dir, set_env=False)
  
imports: import atexit
  import json
  import multiprocessing
  import os
  import os.path
  import platform
  import shutil
  import subprocess
  import sys
  import tempfile
  from functools import lru_cache, partial
  from importlib import import_module
  from pathlib import Path
  from urllib.error import URLError
  from urllib.request import urlopen
  from packaging.version import parse
  from ._logging import logger, warn
  from .check import _check_fname, _check_option, _check_qt_version, _validate_type
  from .docs import fill_doc
  from .misc import _pl
label_desc: Use image node_id 1 for calling a global function with example usage: set_cache_dir(cache_dir) without return types