code: def _prepare_tokenized_text_for_bpe_model(
      text: List[str],
      tokenizer,
      vocabulary: List[str],
      blank_idx: int = 0,
  ):
      """Creates a transition matrix for BPE-based models"""
      space_idx = vocabulary.index("▁")
      ground_truth_mat = [[-1, -1]]
      utt_begin_indices = []
      for uttr in text:
          ground_truth_mat += [[blank_idx, space_idx]]
          utt_begin_indices.append(len(ground_truth_mat))
          token_ids = tokenizer.text_to_ids(uttr)
          # blank token is moved from the last to the first (0) position in the vocabulary
          token_ids = [idx + 1 for idx in token_ids]
          ground_truth_mat += [[t, -1] for t in token_ids]
  
      utt_begin_indices.append(len(ground_truth_mat))
      ground_truth_mat += [[blank_idx, space_idx]]
      ground_truth_mat = np.array(ground_truth_mat, np.int64)
      return ground_truth_mat, utt_begin_indices
  
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 2 for calling a global function with example usage: _prepare_tokenized_text_for_bpe_model(text, tokenizer, vocabulary, blank_idx) and returns: ground_truth_mat,  utt_begin_indices