def METHOD_NAME(self, snr):
    """
    Compute the number of grouped pixels above the alert threshold
    Parameters
    ----------
    snr : numpy array
        The 1D SNR
    Returns
    -------
    n_grouped_pixels_above_threshold : numpy array
        The number of SNR pixels with values above SNR_THRESHOLD
        that are in groups of at least MIN_ADJACENT_PIXELS
    """
    idx_above_thresh = np.where(snr > self.SNR_THRESHOLD)[0]
    consecutive_group_lengths = np.array([len(list(map(itemgetter(1), g))) for k, g in
                                          groupby(enumerate(idx_above_thresh), key=lambda x: x[0]-x[1])])
    pixel_groups = consecutive_group_lengths >= self.MIN_ADJACENT_PIXELS
    n_grouped_pixels_above_threshold = sum(consecutive_group_lengths[pixel_groups])
    return n_grouped_pixels_above_threshold