code: def _sort_subpeaks(ijk, vals, affine):
      """Sort subpeaks in cluster in descending order of stat value.
  
      Parameters
      ----------
      ijk : 2D numpy.ndarray
          The matrix indices of subpeaks to sort.
      vals : 1D numpy.ndarray
          The statistical value associated with each subpeak in ``ijk``.
      affine : (4x4) numpy.ndarray
          The affine of the img from which the subpeaks were extracted.
          Used to convert IJK indices to XYZ coordinates.
  
      Returns
      -------
      xyz : 2D numpy.ndarray
          The sorted coordinates of the subpeaks.
      ijk : 2D numpy.ndarray
          The sorted matrix indices of subpeaks.
      vals : 1D numpy.ndarray
          The sorted statistical value associated with each subpeak in ``ijk``.
      """
      order = (-vals).argsort()
      vals = vals[order]
      ijk = ijk[order, :]
      xyz = nib.affines.apply_affine(
          affine, ijk
      )  # Convert to xyz in mm
      return xyz, ijk, vals
  
file_path: nilearn/nilearn/reporting/get_clusters_table.py
imports: import warnings
  from string import ascii_lowercase
  import nibabel
  import numpy
  import pandas
  from scipy.ndimage import center_of_mass, generate_binary_structure, label, maximum_filter, minimum_filter
  from nilearn._utils import check_niimg_3d
  from nilearn._utils.niimg import safe_get_data
  from nilearn.image import new_img_like, threshold_img
  from nilearn.image.resampling import coord_transform
label_desc: Use image node_id 4 for calling a global function with example usage: _sort_subpeaks(ijk, vals, affine) and returns: xyz,  ijk,  vals