code: def jupyter_config_dir():
      """Get the Jupyter config directory for this platform and user.
  
      Returns JUPYTER_CONFIG_DIR if defined, else ~/.jupyter
      """
  
      env = os.environ
      home_dir = get_home_dir()
  
      if env.get("JUPYTER_NO_CONFIG"):
          return _mkdtemp_once("jupyter-clean-cfg")
  
      if env.get("JUPYTER_CONFIG_DIR"):
          return env["JUPYTER_CONFIG_DIR"]
  
      return pjoin(home_dir, ".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 3 for calling a global function with example usage: jupyter_config_dir() and returns: pjoin, _mkdtemp_once, env