code: def test_get_clusters_table_relabel_label_maps(affine_eye):
      """Check that the cluster's labels in label_maps match their corresponding
      cluster IDs in the clusters table.
      """
      shape = (9, 10, 11)
      data = np.zeros(shape)
      data[2:4, 5:7, 6:8] = 6.0
      data[5:7, 7:9, 7:9] = 5.5
      data[0:3, 0:3, 0:3] = 5.0
      stat_img = nib.Nifti1Image(data, affine_eye)
  
      cluster_table, label_maps = get_clusters_table(
          stat_img,
          4,
          0,
          return_label_maps=True,
      )
  
      # Get cluster ids from clusters table
      cluster_ids = cluster_table["Cluster ID"].to_numpy()
  
      # Find the cluster ids in the label map using the coords from the table.
      coords = cluster_table[["X", "Y", "Z"]].to_numpy().astype(int)
      lb_cluster_ids = label_maps[0].get_fdata()[tuple(coords.T)]
  
      assert np.array_equal(cluster_ids, lb_cluster_ids)
  
file_path: nilearn/nilearn/reporting/tests/test_reporting.py
imports: import nibabel
  import numpy
  import pytest
  from nilearn.image import get_data
  from nilearn.plotting import _set_mpl_backend
  from nilearn.reporting import get_clusters_table
  from nilearn.reporting.get_clusters_table import _cluster_nearest_neighbor, _local_max
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_clusters_table_relabel_label_maps(affine_eye) without return types