code: def make_ctm_files(
      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
  
imports: import os
  import soundfile
  from utils.constants import BLANK_TOKEN, SPACE_TOKEN
  from utils.data_prep import Segment, Word
  from nemo.collections.asr.parts.utils.manifest_utils import get_ctm_line
label_desc: Use image node_id 1 for calling a global function with example usage: make_ctm_files(utt_obj, output_dir_root, ctm_file_config) and returns: utt_obj, utt_obj