code: def get_data_path():
      """Return specified or guessed locations of NIPY data files
  
      The algorithm is to return paths, extracted from strings, where
      strings are found in the following order:
  
      #. The contents of environment variable ``NIPY_DATA_PATH``
      #. Any section = ``DATA``, key = ``path`` value in a ``config.ini``
         file in your nipy user directory (found with
         ``get_nipy_user_dir()``)
      #. Any section = ``DATA``, key = ``path`` value in any files found
         with a ``sorted(glob.glob(os.path.join(sys_dir, '*.ini')))``
         search, where ``sys_dir`` is found with ``get_nipy_system_dir()``
      #. If ``sys.prefix`` is ``/usr``, we add
         ``/usr/local/share/nipy``. We need this because Python 2.6 in
         Debian / Ubuntu does default installs to ``/usr/local``.
      #. The result of ``get_nipy_user_dir()``
  
      Therefore, any paths found in ``NIPY_DATA_PATH`` will be searched
      before paths found in the user directory ``config.ini``
  
      Parameters
      ----------
      None
  
      Returns
      -------
      paths : sequence of paths
  
      Examples
      --------
      >>> pth = get_data_path()
  
      Notes
      -----
      We have to add ``/usr/local/share/nipy`` if sys.prefix is ``/usr``,
      because Debian has patched distutils in Python 2.6 to do default
      distutils installs there:
  
      * https://www.debian.org/doc/packaging-manuals/python-policy/ap-packaging_tools.html#s-distutils
      * https://www.mail-archive.com/debian-python@lists.debian.org/msg05084.html
      """
      paths = []
      try:
          var = os.environ["NIPY_DATA_PATH"]
      except KeyError:
          pass
      else:
          if var:
              paths = var.split(os.path.pathsep)
      np_cfg = pjoin(get_nipy_user_dir(), "config.ini")
      np_etc = get_nipy_system_dir()
      config_files = sorted(glob.glob(pjoin(np_etc, "*.ini")))
      for fname in [np_cfg] + config_files:
          var = _cfg_value(fname)
          if var:
              paths += var.split(os.path.pathsep)
      paths.append(pjoin(sys.prefix, "share", "nipy"))
      if sys.prefix == "/usr":
          paths.append(pjoin("/usr/local", "share", "nipy"))
      paths.append(pjoin(get_nipy_user_dir()))
      return paths
  
imports: import configparser
  import glob
  import os
  import sys
  from os.path import join
  from packaging.version import Version
  from .environment import get_nipy_system_dir, get_nipy_user_dir
label_desc: Use image node_id 2 for calling a global function with example usage: get_data_path() and returns: paths