code: def make_ass_files(
      utt_obj,
      output_dir_root,
      ass_file_config,
  ):
      # 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
  
      if ass_file_config.resegment_text_to_fill_space:
          utt_obj = resegment_utt_obj(utt_obj, ass_file_config)
  
      # get duration of the utterance, so we know the final timestamp of the final set of subtitles,
      # which we will keep showing until the end
      with sf.SoundFile(utt_obj.audio_filepath) as f:
          audio_dur = f.frames / f.samplerate
  
      utt_obj = make_word_level_ass_file(
          utt_obj, output_dir_root, ass_file_config, audio_dur
      )
      utt_obj = make_token_level_ass_file(
          utt_obj, output_dir_root, ass_file_config, audio_dur
      )
  
      return utt_obj
  
file_path: NeMo/tools/nemo_forced_aligner/utils/make_ass_files.py
imports: import math
  import os
  import soundfile
  from utils.constants import BLANK_TOKEN, SPACE_TOKEN
  from utils.data_prep import Segment, Token, Word
label_desc: Use image node_id 3 for calling a global function with example usage: make_ass_files(utt_obj, output_dir_root, ass_file_config) and returns: utt_obj, utt_obj