code: def build_ctc_topo(tokens: List[int]) -> k2.Fsa:
      """Build CTC topology.
  
      A token which appears once on the right side (i.e. olabels) may
      appear multiple times on the left side (ilabels), possibly with
      epsilons in between.
      When 0 appears on the left side, it represents the blank symbol;
      when it appears on the right side, it indicates an epsilon. That
      is, 0 has two meanings here.
      Args:
        tokens:
          A list of tokens, e.g., phones, characters, etc.
      Returns:
        Returns an FST that converts repeated tokens to a single token.
      """
      assert 0 in tokens, "We assume 0 is ID of the blank symbol"
  
      num_states = len(tokens)
      final_state = num_states
      arcs = ""
      for i in range(num_states):
          for j in range(num_states):
              if i == j:
                  arcs += f"{i} {i} {tokens[i]} 0 0.0\n"
              else:
                  arcs += f"{i} {j} {tokens[j]} {tokens[j]} 0.0\n"
          arcs += f"{i} {final_state} -1 -1 0.0\n"
      arcs += f"{final_state}"
      ans = k2.Fsa.from_str(arcs, num_aux_labels=1)
      ans = k2.arc_sort(ans)
      return ans
  
imports: import argparse
  import datetime
  import logging
  import sys
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import k2
  import numpy
  import torch
  import yaml
  from typeguard import check_argument_types, check_return_type
  from espnet2.fileio.datadir_writer import DatadirWriter
  from espnet2.fst.lm_rescore import nbest_am_lm_scores
  from espnet2.tasks.asr import ASRTask
  from espnet2.tasks.lm import LMTask
  from espnet2.text.build_tokenizer import build_tokenizer
  from espnet2.text.token_id_converter import TokenIDConverter
  from espnet2.torch_utils.device_funcs import to_device
  from espnet2.torch_utils.set_all_random_seed import set_all_random_seed
  from espnet2.utils import config_argparse
  from espnet2.utils.types import str2bool, str2triple_str, str_or_none
  from espnet.utils.cli_utils import get_commandline_args
label_desc: Use image node_id 2 for calling a global function with example usage: build_ctc_topo(tokens) and returns: ans