code: def get_cltk_data_dir() -> str:
      """Defines where to look for the ``cltk_data`` dir.
      By default, this is located in a user's home directory
      and the directory is created there (``~/cltk_data``).
      However a user may customize where this goes with
      the OS environment variable ``$CLTK_DATA``. If the
      variable is found, then its value is used.
  
      >>> from cltk.utils import CLTK_DATA_DIR
      >>> import os
      >>> os.environ["CLTK_DATA"] = os.path.expanduser("~/cltk_data")
      >>> cltk_data_dir = get_cltk_data_dir()
      >>> os.path.split(cltk_data_dir)[1]
      'cltk_data'
      >>> del os.environ["CLTK_DATA"]
      >>> os.environ["CLTK_DATA"] = os.path.expanduser("~/custom_dir")
      >>> cltk_data_dir = os.environ.get("CLTK_DATA")
      >>> os.path.split(cltk_data_dir)[1]
      'custom_dir'
      >>> del os.environ["CLTK_DATA"]
      """
      import os  # pylint: disable=import-outside-toplevel
  
      if "CLTK_DATA" in os.environ:
          cltk_data_dir = os.path.expanduser(
              os.path.normpath(os.environ["CLTK_DATA"])
          )
          if not os.path.isdir(cltk_data_dir):
              raise FileNotFoundError(
                  "Custom data directory `%s` does not exist. "
                  "Update your OS environment variable `$CLTK_DATA` "
                  "or remove it." % cltk_data_dir
              )
          if not os.access(cltk_data_dir, os.W_OK):
              raise PermissionError(
                  "Custom data directory `%s` must have "
                  "write permission." % cltk_data_dir
              )
      else:
          cltk_data_dir = os.path.expanduser(
              os.path.normpath(os.path.join("~", "cltk_data"))
          )
      return cltk_data_dir
  
imports: import os
  import sys
  from contextlib import contextmanager
  from enum import EnumMeta, IntEnum
  from typing import Any, Dict, List, Optional, Union
  import requests
  from tqdm import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: get_cltk_data_dir() and returns: cltk_data_dir