code: def _viterbi_decode(
      emission: torch.Tensor, id2token: Dict, blank_idx: int = 0
  ) -> List[str]:
      """Run greedy decoding for ctc outputs.
  
      Args:
          emission (torch.Tensor): Output of CTC layer. Tensor with dimensions (..., time, num_tokens).
          id2token (Dictionary): The dictionary that maps indices of emission's last dimension
              to the corresponding tokens.
  
      Returns:
          (List of str): The decoding result. List of string in lower case.
      """
      hypothesis = emission.argmax(-1).unique_consecutive()
      hypothesis = hypothesis[hypothesis != blank_idx]
      hypothesis = (
          "".join(id2token[int(i)] for i in hypothesis)
          .replace("|", " ")
          .strip()
      )
      return hypothesis.split()
  
file_path: audio/examples/hubert/evaluate.py
imports: import argparse
  import logging
  from typing import Dict, List
  import torch
  import torch.nn.functional
  import torchaudio
  from torchaudio.models.decoder import ctc_decoder, CTCDecoder, download_pretrained_files
  from utils import _get_id2label
label_desc: Use image node_id 2 for calling a global function with example usage: _viterbi_decode(emission, id2token, blank_idx) and returns: hypothesis