code: def test_validity_of_ncuts_error_in_find_cut_slices(affine_eye):
      data = np.zeros((50, 50, 50))
      x_map, y_map, z_map = 25, 5, 20
      data[
          x_map - 15 : x_map + 15,
          y_map - 3 : y_map + 3,
          z_map - 10 : z_map + 10,
      ] = 1
      img = nibabel.Nifti1Image(data, affine_eye)
      direction = "z"
      for n_cuts in (0, -2, -10.00034, 0.999999, 0.4, 0.11111111):
          message = (
              f"Image has {data.shape[0]} slices in direction {direction}. "
              "Therefore, the number of cuts "
              f"must be between 1 and {data.shape[0]}. "
              f"You provided n_cuts={n_cuts}."
          )
          with pytest.raises(ValueError, match=message):
              find_cut_slices(img, n_cuts=n_cuts)
  
file_path: nilearn/nilearn/plotting/tests/test_find_cuts.py
imports: import nibabel
  import numpy
  import pytest
  from nilearn.masking import compute_epi_mask
  from nilearn.plotting.find_cuts import _transform_cut_coords, find_cut_slices, find_parcellation_cut_coords, find_probabilistic_atlas_cut_coords, find_xyz_cut_coords
label_desc: Use image node_id 3 for calling a global function with example usage: test_validity_of_ncuts_error_in_find_cut_slices(affine_eye) without return types