code: def test_find_parcellation_cut_coords(affine_eye):
      data = np.zeros((100, 100, 100))
      x_map_a, y_map_a, z_map_a = (10, 10, 10)
      x_map_b, y_map_b, z_map_b = (30, 30, 30)
      x_map_c, y_map_c, z_map_c = (50, 50, 50)
      # Defining 3 parcellations
      data[
          x_map_a - 10 : x_map_a + 10,
          y_map_a - 10 : y_map_a + 10,
          z_map_a - 10 : z_map_a + 10,
      ] = 2301
      data[
          x_map_b - 10 : x_map_b + 10,
          y_map_b - 10 : y_map_b + 10,
          z_map_b - 10 : z_map_b + 10,
      ] = 4001
      data[
          x_map_c - 10 : x_map_c + 10,
          y_map_c - 10 : y_map_c + 10,
          z_map_c - 10 : z_map_c + 10,
      ] = 6201
  
      # Number of labels
      labels = np.unique(data)
      labels = labels[labels != 0]
      n_labels = len(labels)
  
      # identity affine
      img = nibabel.Nifti1Image(data, affine_eye)
      # find coordinates with return label names is True
      coords, labels_list = find_parcellation_cut_coords(
          img, return_label_names=True
      )
      # Check outputs
      assert (n_labels, 3) == coords.shape
      # number of labels in data should equal number of labels list returned
      assert n_labels == len(labels_list)
      # Labels numbered should match the numbers in returned labels list
      assert list(labels) == labels_list
  
      # Match with the number of non-overlapping labels
      np.testing.assert_allclose(
          (coords[0][0], coords[0][1], coords[0][2]),
          (x_map_a, y_map_a, z_map_a),
          rtol=6e-2,
      )
      np.testing.assert_allclose(
          (coords[1][0], coords[1][1], coords[1][2]),
          (x_map_b, y_map_b, z_map_b),
          rtol=6e-2,
      )
      np.testing.assert_allclose(
          (coords[2][0], coords[2][1], coords[2][2]),
          (x_map_c, y_map_c, z_map_c),
          rtol=6e-2,
      )
  
      # non-trivial affine
      affine = np.diag([1 / 2.0, 1 / 3.0, 1 / 4.0, 1.0])
      img = nibabel.Nifti1Image(data, affine)
      coords = find_parcellation_cut_coords(img)
      assert (n_labels, 3) == coords.shape
      np.testing.assert_allclose(
          (coords[0][0], coords[0][1], coords[0][2]),
          (x_map_a / 2.0, y_map_a / 3.0, z_map_a / 4.0),
          rtol=6e-2,
      )
      np.testing.assert_allclose(
          (coords[1][0], coords[1][1], coords[1][2]),
          (x_map_b / 2.0, y_map_b / 3.0, z_map_b / 4.0),
          rtol=6e-2,
      )
      np.testing.assert_allclose(
          (coords[2][0], coords[2][1], coords[2][2]),
          (x_map_c / 2.0, y_map_c / 3.0, z_map_c / 4.0),
          rtol=6e-2,
      )
      # test raises an error with wrong label_hemisphere name with 'lft'
      error_msg = (
          "Invalid label_hemisphere name:lft.\nShould be one of "
          "these 'left' or 'right'."
      )
      with pytest.raises(ValueError, match=error_msg):
          find_parcellation_cut_coords(
              labels_img=img, label_hemisphere="lft"
          )
  
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 9 for calling a global function with example usage: test_find_parcellation_cut_coords(affine_eye) without return types