code: def _check_error(missing):
      """Consolidate a single error message across multiple missing confounds."""
      if missing["confounds"] or missing["keywords"]:
          error_msg = (
              "The following keywords or parameters are missing: "
              + f" {missing['confounds']}"
              + f" {missing['keywords']}"
              + ". You may want to try a different denoising strategy."
          )
          raise ValueError(error_msg)
  
file_path: nilearn/nilearn/interfaces/fmriprep/load_confounds.py
imports: import warnings
  import pandas
  from .None import load_confounds_components
  from .load_confounds_utils import MissingConfound, get_confounds_file, get_json, load_confounds_file_as_dataframe, load_confounds_json, prepare_output, sanitize_confounds
label_desc: Use image node_id 2 for calling a global function with example usage: _check_error(missing) without return types