code: def test_high_variance_confounds():
      img, mask, conf = _simu_img()
      hv_confounds = high_variance_confounds(img)
      masker1 = NiftiMasker(
          standardize="zscore_sample",
          detrend=False,
          high_variance_confounds=False,
          mask_img=mask,
      ).fit()
      tseries1 = masker1.transform(img, confounds=[hv_confounds, conf])
      masker2 = NiftiMasker(
          standardize="zscore_sample",
          detrend=False,
          high_variance_confounds=True,
          mask_img=mask,
      ).fit()
      tseries2 = masker2.transform(img, confounds=conf)
      np.testing.assert_array_equal(tseries1, tseries2)
  
imports: import warnings
  import numpy
  import pytest
  from nibabel import Nifti1Image
  from numpy.testing import assert_array_equal
  from sklearn.preprocessing import StandardScaler
  from nilearn import masking
  from nilearn._utils import data_gen
  from nilearn._utils.exceptions import DimensionError
  from nilearn._utils.testing import write_imgs_to_path
  from nilearn.conftest import _rng
  from nilearn.image import get_data, high_variance_confounds
  from nilearn.maskers import NiftiMasker
  from nilearn.masking import _MaskWarning, _unmask_3d, _unmask_4d, compute_background_mask, compute_brain_mask, compute_epi_mask, compute_multi_brain_mask, compute_multi_epi_mask, extrapolate_out_mask, intersect_masks, unmask, unmask_from_to_3d_array
label_desc: Use image node_id 4 for calling a global function with example usage: test_high_variance_confounds() without return types