def run_multipart_sweep(ri, length_seconds=0, state=None, description='', num_tones_read_at_once=32, verbose=False,
                        **kwargs):
    num_tones = ri.tone_bins.shape[1]
    num_steps = num_tones // num_tones_read_at_once
    if num_steps == 0:
        num_steps = 1
    indices_to_read = range(num_tones)
    parts = []
    for step in range(num_steps):
        if verbose:
            print("running sweep step {} of {}.".format(step,num_steps))
        parts.append(run_loaded_sweep(ri, length_seconds=length_seconds, state=state, description=description,
                                      bin_indices=indices_to_read[step::num_steps], **kwargs))
    stream_arrays = core.MeasurementList()
    for part in parts:
        stream_arrays.extend(list(part.stream_arrays))
    return basic.SweepArray(stream_arrays, state=state, description=description)