code: def jupyter_path(*subdirs):
      """Return a list of directories to search for data files
  
      JUPYTER_PATH environment variable has highest priority.
  
      If ``*subdirs`` are given, that subdirectory will be added to each element.
  
      Examples:
  
      >>> jupyter_path()
      ['~/.local/jupyter', '/usr/local/share/jupyter']
      >>> jupyter_path('kernels')
      ['~/.local/jupyter/kernels', '/usr/local/share/jupyter/kernels']
      """
  
      paths = []
      # highest priority is env
      if os.environ.get("JUPYTER_PATH"):
          paths.extend(
              p.rstrip(os.sep)
              for p in os.environ["JUPYTER_PATH"].split(os.pathsep)
          )
      # then user dir
      paths.append(jupyter_data_dir())
      # then sys.prefix
      for p in ENV_JUPYTER_PATH:
          if p not in SYSTEM_JUPYTER_PATH:
              paths.append(p)
      # finally, system
      paths.extend(SYSTEM_JUPYTER_PATH)
  
      # add subdir, if requested
      if subdirs:
          paths = [pjoin(p, *subdirs) for p in paths]
      return paths
  
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 6 for calling a global function with example usage: jupyter_path() and returns: paths