code: def test_not_found_exception(tmp_path, fmriprep_version):
      """Check various file or parameter missing scenario."""
      # Create invalid confound file in temporary dir
      img_missing_confounds, bad_conf = create_tmp_filepath(
          tmp_path,
          copy_confounds=True,
          copy_json=False,
          fmriprep_version=fmriprep_version,
      )
  
      _remove_confounds(bad_conf)
  
      with pytest.raises(ValueError) as exc_info:
          load_confounds(
              img_missing_confounds,
              strategy=(
                  "high_pass",
                  "motion",
                  "global_signal",
              ),
              global_signal="full",
              motion="full",
          )
      assert f"{missing_params}" in exc_info.value.args[0]
  
      # missing cosine if it's not present in the file it's fine
      assert f"{missing_keywords[-1:]}" in exc_info.value.args[0]
  
      # loading anat compcor should also raise an error, because the json file is
      # missing for that example dataset
      with pytest.raises(ValueError):
          load_confounds(
              img_missing_confounds,
              strategy=("high_pass", "compcor"),
              compcor="anat_combined",
          )
  
      # catch invalid compcor option
      with pytest.raises(KeyError):
          load_confounds(
              img_missing_confounds,
              strategy=("high_pass", "compcor"),
              compcor="blah",
          )
  
imports: import re
  import numpy
  import pandas
  import pytest
  from nibabel import Nifti1Image
  from scipy.stats import pearsonr
  from sklearn.preprocessing import scale
  from nilearn._utils.data_gen import create_fake_bids_dataset
  from nilearn._utils.fmriprep_confounds import to_camel_case
  from nilearn.conftest import _rng
  from nilearn.interfaces.bids import get_bids_files
  from nilearn.interfaces.fmriprep import load_confounds
  from nilearn.interfaces.fmriprep.load_confounds import _check_strategy, _load_single_confounds_file
  from nilearn.interfaces.fmriprep.tests._testing import create_tmp_filepath, get_legal_confound
  from nilearn.maskers import NiftiMasker
label_desc: Use image node_id 17 for calling a global function with example usage: test_not_found_exception(tmp_path, fmriprep_version) without return types