code: def set_cache_dir(cache_dir):
      """
      Sets all relevant cache directories to ``TR_CACHE_DIR``.
  
      """
      # Tensorflow Hub cache directory
      os.environ["TFHUB_CACHE_DIR"] = cache_dir
      # HuggingFace `transformers` cache directory
      os.environ["PYTORCH_TRANSFORMERS_CACHE"] = os.path.join(
          cache_dir, "transformers"
      )
      # HuggingFace `datasets` cache directory
      os.environ["HF_HOME"] = cache_dir
      # Basic directory for Linux user-specific non-data files
      os.environ["XDG_CACHE_HOME"] = cache_dir
  
file_path: textflint/textflint/common/utils/install.py
imports: import os
  import shutil
  import tempfile
  import zipfile
  import filelock
  import requests
  import tqdm
  from .logger import logger
  from ..settings import CACHE_DIR
label_desc: Use image node_id 4 for calling a global function with example usage: set_cache_dir(cache_dir) without return types