def METHOD_NAME(sample_mzs_bytes, sample_sp_n, max_chunk_size_mb=500):
    segm_arr_column_n = 3  # sp_idx, mzs, ints
    sample_spectra_size_mb = (
        sample_mzs_bytes * (segm_arr_column_n + 1) / 2 ** 20
    )  # +1 - sort arg copy of mzs
    spectrum_size_mb = sample_spectra_size_mb / sample_sp_n
    chunk_sp_n = int(max_chunk_size_mb / spectrum_size_mb)
    return max(1, chunk_sp_n)