code: def test_get_cut_slices(affine_eye):
      # Generate simple simulated data with one "spot"
      img, data = _simulate_img()
  
      # Use automatic selection of coordinates
      cut_slices = html_stat_map._get_cut_slices(
          img, cut_coords=None, threshold=None
      )
      assert (cut_slices == [4, 4, 4]).all()
  
      # Check that using a single number for cut_coords raises an error
      with pytest.raises(ValueError):
          html_stat_map._get_cut_slices(
              img, cut_coords=4, threshold=None
          )
  
      # Check that it is possible to manually specify coordinates
      cut_slices = html_stat_map._get_cut_slices(
          img, cut_coords=[2, 2, 2], threshold=None
      )
      assert (cut_slices == [2, 2, 2]).all()
  
      # Check that the affine does not change where the cut is done
      affine = 2 * affine_eye
      img = Nifti1Image(data, affine)
      cut_slices = html_stat_map._get_cut_slices(
          img, cut_coords=None, threshold=None
      )
      assert (cut_slices == [4, 4, 4]).all()
  
imports: import base64
  import warnings
  from io import BytesIO
  import numpy
  import pytest
  from matplotlib import pyplot
  from nibabel import Nifti1Image
  from nilearn import datasets, image
  from nilearn.image import get_data, new_img_like
  from nilearn.plotting import html_stat_map
  from ..js_plotting_utils import colorscale
label_desc: Use image node_id 17 for calling a global function with example usage: test_get_cut_slices(affine_eye) without return types