code: def get_home_dir() -> str:
      r"""Get the cache directory used for storing all :pyg:`PyG`-related data.
  
      If :meth:`set_home_dir` is not called, the path is given by the environment
      variable :obj:`$PYG_HOME` which defaults to :obj:`"~/.cache/pyg"`.
      """
      if _home_dir is not None:
          return _home_dir
  
      return osp.expanduser(os.getenv(ENV_PYG_HOME, DEFAULT_CACHE_DIR))
  
imports: import os
  import os.path
  from typing import Optional
label_desc: Use image node_id 1 for calling a global function with example usage: get_home_dir() and returns: osp, _home_dir