code: def test_load_single_confounds_file(tmp_path, fmriprep_version):
      """Check that the load_confounds function returns the same confounds \
      as _load_single_confounds_file."""
      nii_file, confounds_file = create_tmp_filepath(
          tmp_path,
          copy_confounds=True,
          fmriprep_version=fmriprep_version,
      )
  
      # get defaults from load_confounds
      import inspect
  
      _defaults = {
          key: value.default
          for key, value in inspect.signature(
              load_confounds
          ).parameters.items()
      }
      _defaults.pop("img_files")
      _default_strategy = _defaults.pop("strategy")
  
      _, confounds = _load_single_confounds_file(
          str(confounds_file), strategy=_default_strategy, **_defaults
      )
      confounds_nii, _ = load_confounds(
          nii_file, strategy=_default_strategy, **_defaults
      )
      pd.testing.assert_frame_equal(confounds, confounds_nii)
  
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 11 for calling a global function with example usage: test_load_single_confounds_file(tmp_path, fmriprep_version) without return types