code: def jupyter_data_dir():
      """Get the config directory for Jupyter data files.
  
      These are non-transient, non-configuration files.
  
      Returns JUPYTER_DATA_DIR if defined, else a platform-appropriate path.
      """
      env = os.environ
  
      if env.get("JUPYTER_DATA_DIR"):
          return env["JUPYTER_DATA_DIR"]
  
      home = get_home_dir()
  
      if sys.platform == "darwin":
          return os.path.join(home, "Library", "Jupyter")
      elif os.name == "nt":
          appdata = os.environ.get("APPDATA", None)
          if appdata:
              return pjoin(appdata, "jupyter")
          else:
              return pjoin(jupyter_config_dir(), "data")
      else:
          # Linux, non-OS X Unix, AIX, etc.
          xdg = env.get("XDG_DATA_HOME", None)
          if not xdg:
              xdg = pjoin(home, ".local", "share")
          return pjoin(xdg, "jupyter")
  
imports: import os
  import sys
  import stat
  import errno
  import tempfile
  import warnings
  from ipython_genutils import py3compat
  from contextlib import contextmanager
  from distutils.util import strtobool
  from ipython_genutils import py3compat
label_desc: Use image node_id 4 for calling a global function with example usage: jupyter_data_dir() and returns: env, os, pjoin, pjoin, pjoin