def METHOD_NAME(segm_i: int, segm_cobject: CObj[pd.DataFrame], *, storage: Storage):
    print(f'Calculating peaks from formulas chunk {segm_i}')
    chunk_df = load_cobj(storage, segm_cobject)
    chunk_iter = chunk_df[['ion_formula', 'target', 'targeted']].itertuples(True, None)
    peaks = list(chain(*map(calculate_peaks_for_formula, chunk_iter)))
    peaks_df = pd.DataFrame(
        peaks, columns=['formula_i', 'peak_i', 'mz', 'int', 'target', 'targeted']
    )
    peaks_df = peaks_df.astype(
        {
            'formula_i': 'u4',
            'peak_i': 'u1',
            'mz': 'f8',
            'int': 'f4',
            'target': '?',
            'targeted': '?',
        }
    )
    peaks_df.set_index('formula_i', inplace=True)
    print(f'Storing centroids chunk {segm_i}')
    peaks_cobject = save_cobj(storage, peaks_df)
    return peaks_cobject, peaks_df.shape[0]