code: def get_peak_position_from_thresholded_map(
      stat_map, domain, threshold
  ):
      """The peaks above thr in 18-connectivity are computed
  
      Parameters
      ----------
      stat_map: array of shape (nbvox): map to threshold
      deomain: referential- and domain-defining image
      thr, float: cluster-forming threshold
  
      Returns
      -------
      positions array of shape(k,anat_dim):
                the cluster positions in physical coordinates
                where k= number of clusters
                if no such cluster exists, None is returned
      """
      from ..statistical_mapping import get_3d_peaks
  
      # create an image to represent stat_map
      simage = domain.to_image(data=stat_map)
  
      # extract the peaks
      peaks = get_3d_peaks(simage, threshold=threshold, order_th=2)
      if peaks is None:
          return None
  
      pos = np.array([p["pos"] for p in peaks])
      return pos
  
imports: import numpy
  from nipy.io.nibcompat import get_affine
  from nipy.labs.spatial_models.discrete_domain import grid_domain_from_binary_array
label_desc: Use image node_id 4 for calling a global function with example usage: get_peak_position_from_thresholded_map(stat_map, domain, threshold) and returns: pos, None