code: def create_new_ctm_entry(
      session_name, speaker_id, wordlist, alignments, output_precision=3
  ):
      """
      Create new CTM entry (to write to output ctm file)
  
      Args:
          session_name (str): Current session name.
          speaker_id (int): LibriSpeech speaker ID for the current entry.
          wordlist (list): List of words
          alignments (list): List of alignments
          output_precision (int): Precision for CTM outputs
      Returns:
          arr (list): List of ctm entries
      """
      arr = []
      for i in range(len(wordlist)):
          word = wordlist[i]
          if word != "":
              # note that using the current alignments the first word is always empty, so there is no error from indexing the array with i-1
              align1 = float(round(alignments[i - 1], output_precision))
              align2 = float(
                  round(
                      alignments[i] - alignments[i - 1],
                      output_precision,
                  )
              )
              text = get_ctm_line(
                  source=session_name,
                  channel=speaker_id,
                  start_time=align1,
                  duration=align2,
                  token=word,
                  conf=0,
                  type_of_token="lex",
                  speaker=speaker_id,
                  output_precision=output_precision,
              )
              arr.append((align1, text))
      return arr
  
file_path: NeMo/scripts/speaker_tasks/create_alignment_manifest.py
imports: import argparse
  import os
  import shutil
  from pathlib import Path
  from typing import List
  from nemo.collections.asr.parts.utils.manifest_utils import get_ctm_line, read_manifest, write_ctm, write_manifest
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling a global function with example usage: create_new_ctm_entry(session_name, speaker_id, wordlist, alignments, output_precision) and returns: arr