code: def get_cache_dir(env: Optional[Env] = None) -> Path:
      env = env or os.environ
      return Path(env.get(CACHE_DIR, appdirs.user_cache_dir("wandb")))
  
imports: import json
  import os
  import sys
  from distutils.util import strtobool
  from pathlib import Path
  from typing import List, MutableMapping, Optional, Union
  import appdirs
label_desc: Use image node_id 31 for calling a global function with example usage: get_cache_dir(env) and returns: Path