code: def test_threshold_bound_error():
      """Test that an error is raised when the threshold is higher \
      than the number of components."""
      with pytest.raises(
          ValueError, match="Threshold must not be higher"
      ):
          CanICA(n_components=4, threshold=5.0)
  
imports: import numpy
  import pytest
  from nibabel import Nifti1Image
  from numpy.testing import assert_array_almost_equal
  from nilearn._utils.testing import write_imgs_to_path
  from nilearn.conftest import _affine_eye, _rng
  from nilearn.decomposition.canica import CanICA
  from nilearn.image import get_data, iter_img
  from nilearn.maskers import MultiNiftiMasker
label_desc: Use image node_id 6 for calling a global function with example usage: test_threshold_bound_error() without return types