code: def _do_path_update(path, update_path, key, name):
      """Update path."""
      path = op.abspath(path)
      identical = get_config(key, "", use_env=False) == path
      if not identical:
          if update_path is None:
              update_path = True
              if "--update-dataset-path" in sys.argv:
                  answer = "y"
              else:
                  msg = (
                      f"Do you want to set the path:\n    {path}\nas the default {name} "
                      "dataset path in the mne-python config [y]/n? "
                  )
                  answer = _safe_input(msg, alt="pass update_path=True")
              if answer.lower() == "n":
                  update_path = False
  
          if update_path:
              set_config(key, str(path), set_env=False)
      return path
  
imports: import importlib
  import inspect
  import logging
  import os
  import os.path
  import sys
  import tempfile
  import time
  import zipfile
  from collections import OrderedDict
  from pathlib import Path
  import numpy
  from ..label import Label, read_labels_from_annot, write_labels_to_annot
  from ..utils import _pl, _safe_input, _validate_type, get_config, get_subjects_dir, logger, set_config, verbose
  from ..utils.docs import _docformat, docdict
  from .config import MNE_DATASETS, _hcp_mmp_license_text
label_desc: Use image node_id 3 for calling a global function with example usage: _do_path_update(path, update_path, key, name) and returns: path