code: def data_path(
      url,
      path=None,
      force_update=False,
      update_path=None,
      *,
      verbose=None,
  ):
      """Get path to local copy of EEGMMI dataset URL.
  
      This is a low-level function useful for getting a local copy of a remote EEGBCI
      dataset :footcite:`SchalkEtAl2004`, which is also available at PhysioNet
      :footcite:`GoldbergerEtAl2000`.
  
      Parameters
      ----------
      url : str
          The dataset to use.
      path : None | path-like
          Location of where to look for the EEGBCI data. If ``None``, the environment
          variable or config parameter ``MNE_DATASETS_EEGBCI_PATH`` is used. If neither
          exists, the ``~/mne_data`` directory is used. If the EEGBCI dataset is not found
          under the given path, the data will be automatically downloaded to the specified
          folder.
      force_update : bool
          Force update of the dataset even if a local copy exists.
      update_path : bool | None
          If ``True``, set ``MNE_DATASETS_EEGBCI_PATH`` in the configuration to the given
          path. If ``None``, the user is prompted.
      %(verbose)s
  
      Returns
      -------
      path : list of Path
          Local path to the given data file. This path is contained inside a list of
          length one for compatibility.
  
      Notes
      -----
      For example, one could do:
  
          >>> from mne.datasets import eegbci
          >>> url = "http://www.physionet.org/physiobank/database/eegmmidb/"
          >>> eegbci.data_path(url, "~/datasets") # doctest:+SKIP
  
      This would download the given EEGBCI data file to the ``~/datasets`` folder and
      prompt the user to store this path in the config (if it does not already exist).
  
      References
      ----------
      .. footbibliography::
      """
      import pooch
  
      key = "MNE_DATASETS_EEGBCI_PATH"
      name = "EEGBCI"
      path = _get_path(path, key, name)
      fname = "MNE-eegbci-data"
      destination = _url_to_local_path(url, op.join(path, fname))
      destinations = [destination]
  
      # fetch the file
      downloader = pooch.HTTPDownloader(**_downloader_params())
      if not op.isfile(destination) or force_update:
          if op.isfile(destination):
              os.remove(destination)
          if not op.isdir(op.dirname(destination)):
              os.makedirs(op.dirname(destination))
          pooch.retrieve(
              url=url,
              path=destination,
              downloader=downloader,
              fname=fname,
          )
  
      # offer to update the path
      _do_path_update(path, update_path, key, name)
      destinations = [Path(dest) for dest in destinations]
      return destinations
  
file_path: mne-python/mne/datasets/eegbci/eegbci.py
imports: import os
  import re
  import time
  from importlib.resources import files
  from os import path
  from pathlib import Path
  from ...utils import _url_to_local_path, logger, verbose
  from ..utils import _do_path_update, _downloader_params, _get_path, _log_time_size
label_desc: Use image node_id 1 for calling a global function with example usage: data_path(url, path, force_update, update_path) and returns: destinations