def METHOD_NAME(
    utt_obj, output_dir_root, ctm_file_config,
):
    """
    Function to save CTM files for all the utterances in the incoming batch.
    """
    # don't try to make files if utt_obj.segments_and_tokens is empty, which will happen
    # in the case of the ground truth text being empty or the number of tokens being too large vs audio duration
    if not utt_obj.segments_and_tokens:
        return utt_obj
    # get audio file duration if we will need it later
    if ctm_file_config.minimum_timestamp_duration > 0:
        with sf.SoundFile(utt_obj.audio_filepath) as f:
            audio_file_duration = f.frames / f.samplerate
    else:
        audio_file_duration = None
    utt_obj = make_ctm("tokens", utt_obj, output_dir_root, audio_file_duration, ctm_file_config,)
    utt_obj = make_ctm("words", utt_obj, output_dir_root, audio_file_duration, ctm_file_config,)
    utt_obj = make_ctm("segments", utt_obj, output_dir_root, audio_file_duration, ctm_file_config,)
    return utt_obj