code: def _get_segment_n_chars(segment):
      n_chars = 0
      for word_or_token in segment.words_and_tokens:
          if word_or_token.text == SPACE_TOKEN:
              n_chars += 1
          elif word_or_token.text != BLANK_TOKEN:
              n_chars += len(word_or_token.text)
      return n_chars
  
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 5 for calling a global function with example usage: _get_segment_n_chars(segment) and returns: n_chars