def METHOD_NAME(
    fexec: Executor, formula_cobjs: List[CObj[pd.DataFrame]], isocalc_wrapper: IsocalcWrapper
) -> List[CObj[pd.DataFrame]]:
    def calculate_peaks_for_formula(args):
        formula_i, formula, target, targeted = args
        mzs, ints = isocalc_wrapper.centroids(formula)
        if mzs is not None:
            return [
                (formula_i, peak_i, mzs[peak_i], ints[peak_i], target, targeted)
                for peak_i in range(len(mzs))
            ]
        return []
    def calculate_peaks_chunk(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]
    peaks_cobjs, peaks_cobject_lens = fexec.map_unpack(
        calculate_peaks_chunk,
        list(enumerate(formula_cobjs)),
        runtime_memory=2048,
    )
    num_centroids = sum(peaks_cobject_lens)
    logger.info(f'Calculated {num_centroids} centroids in {len(peaks_cobjs)} chunks')
    def _sort_peaks_cobjs(*, storage):
        df = pd.concat(load_cobjs(storage, peaks_cobjs))
        first_peak_mz = df.mz[df.peak_i == 0].sort_values()
        peaks_chunk_size = 64 * 2 ** 20
        n_chunks = int(np.ceil(df.memory_usage().sum() / peaks_chunk_size))
        cnt = len(first_peak_mz)
        chunks = (
            df.loc[first_peak_mz.index[cnt * i // n_chunks : cnt * (i + 1) // n_chunks]]
            for i in range(n_chunks)
        )
        return save_cobjs(storage, chunks)
    sorted_peaks_cobjs = fexec.call(
        _sort_peaks_cobjs,
        (),
        cost_factors={'num_centroids': num_centroids, 'num_peak_cobjects': len(peaks_cobjs)},
        runtime_memory=256 + 100 * num_centroids / 2 ** 20,
    )
    logger.info(f'Sorted centroids chunks into {len(sorted_peaks_cobjs)} chunks')
    return sorted_peaks_cobjs