class_docstr: ASR model wrapper to perform alignment building.
  Functionality is limited to the components needed to build an alignment.
docstr: Builds time alignment of an encoded sequence.
  This method assumes that the RNNT model is used and the alignment type is `argmax`.
  
  It produces a list of sample ids and fours: (label, start_frame, length, probability), called FrameCtmUnit.
docstr_tok: ["Builds","time","alignment","of","an","encoded","sequence",".","This","method","assumes","that","the","RNNT","model","is","used","and","the","alignment","type","is","`","argmax","`",".","It","produces","a","list","of","sample","ids","and","fours",":","(","label",",","start_frame",",","length",",","probability",")",",","called","FrameCtmUnit","."]
code: def _predict_impl_rnnt_argmax(
      self,
      encoded: torch.Tensor,
      encoded_len: torch.Tensor,
      transcript: torch.Tensor,
      transcript_len: torch.Tensor,
      sample_id: torch.Tensor,
  ) -> List[Tuple[int, "FrameCtmUnit"]]:
      """Builds time alignment of an encoded sequence.
      This method assumes that the RNNT model is used and the alignment type is `argmax`.
  
      It produces a list of sample ids and fours: (label, start_frame, length, probability), called FrameCtmUnit.
      """
      hypotheses = self._model.decoding.rnnt_decoder_predictions_tensor(
          encoded, encoded_len, return_hypotheses=True
      )[0]
      results = []
      for s_id, hypothesis in zip(sample_id, hypotheses):
          pred_ids = hypothesis.y_sequence.tolist()
          tokens = self._model.decoding.decode_ids_to_tokens(pred_ids)
          token_begin = hypothesis.timestep
          token_len = [
              j - i
              for i, j in zip(
                  token_begin,
                  token_begin[1:] + [len(hypothesis.alignments)],
              )
          ]
          # we have no token probabilities for the argmax rnnt setup
          token_prob = [1.0] * len(tokens)
          if self.word_output:
              words = [
                  w
                  for w in self._model.decoding.decode_tokens_to_str(
                      pred_ids
                  ).split(" ")
                  if w != ""
              ]
              words, word_begin, word_len, word_prob = (
                  self._process_tokens_to_words(
                      tokens, token_begin, token_len, token_prob, words
                  )
                  if hasattr(self._model, "tokenizer")
                  else self._process_char_with_space_to_words(
                      tokens, token_begin, token_len, token_prob, words
                  )
              )
              results.append(
                  (
                      s_id,
                      [
                          FrameCtmUnit(t, b, l, p)
                          for t, b, l, p in zip(
                              words, word_begin, word_len, word_prob
                          )
                      ],
                  )
              )
          else:
              results.append(
                  (
                      s_id,
                      [
                          FrameCtmUnit(t, b, l, p)
                          for t, b, l, p in zip(
                              tokens, token_begin, token_len, token_prob
                          )
                      ],
                  )
              )
      return results
  
imports: import copy
  import os
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  from tqdm.auto import tqdm
  from nemo.collections.asr.data.audio_to_ctm_dataset import FrameCtmUnit
  from nemo.collections.asr.data.audio_to_text_dali import DALIOutputs
  from nemo.collections.asr.models.asr_model import ASRModel
  from nemo.utils import logging
label_desc: Use image node_id 8 for calling the AlignerWrapperModel obj's underlying member method code with example usage: obj._predict_impl_rnnt_argmax(encoded, encoded_len, transcript, transcript_len, sample_id) and returns: results