code: def build_minimal_topo(tokens: List[int]) -> "k2.Fsa":
      """Build the minimal topology.
      Zero is assumed to be the ID of the blank symbol.
      See https://arxiv.org/abs/2110.03098
      """
      assert (
          -1 not in tokens
      ), "We assume -1 is ID of the final transition"
      assert 0 in tokens, "We assume 0 is the ID of the blank symbol"
  
      num_tokens = len(tokens)
      final_state = 1
      arcs = ""
      for i in range(num_tokens):
          arcs += f"0 0 {tokens[i]} {tokens[i]} 0.0\n"
      arcs += f"0 {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
  
file_path: NeMo/nemo/collections/asr/parts/k2/topologies.py
imports: from functools import lru_cache
  from typing import List, Optional, Union
  import torch
  from nemo.core.utils.k2_guard import k2
label_desc: Use image node_id 5 for calling a global function with example usage: build_minimal_topo(tokens) and returns: ans