code: def _get_blank_spans(char_list, blank="ε"):
      """
      Returns a list of tuples:
          (start index, end index (exclusive), count)
  
      ignores blank symbols at the beginning and end of the char_list
      since they're not suitable for split in between
      """
      blanks = []
      start = None
      end = None
      for i, ch in enumerate(char_list):
          if ch == blank:
              if start is None:
                  start, end = i, i
              else:
                  end = i
          else:
              if start is not None:
                  # ignore blank tokens at the beginning
                  if start > 0:
                      end += 1
                      blanks.append((start, end, end - start))
                  start = None
                  end = None
      return blanks
  
file_path: NeMo/tools/ctc_segmentation/scripts/utils.py
imports: import logging
  import logging.handlers
  import math
  import os
  import sys
  from pathlib import PosixPath
  from typing import List, Tuple, Union
  import ctc_segmentation
  import numpy
  from tqdm import tqdm
  from nemo.collections.common.tokenizers.sentencepiece_tokenizer import SentencePieceTokenizer
label_desc: Use image node_id 4 for calling a global function with example usage: _get_blank_spans(char_list, blank) and returns: blanks