code: def _summarize_peaks(peaks):
      
      previous = peaks[0]
      new_peaks = [previous]
      for pos in peaks:
          if pos > previous + 10:
              new_peaks.add(pos)
          previous = pos
      return new_peaks
docs: merge peaks position if closer than 10