class_docstr: @property
  def input_types(self):
      """Returns definitions of module input ports.
      """
      return {
          "log_probs": NeuralType(('B', 'T', 'D'), LogprobsType()),
      }
  
  @property
  def output_types(self):
      """Returns definitions of module output ports.
      """
      return {"hypos": NeuralType(('B'), PredictionsType())}
docstr: Normalize tokens by handling CTC blank, ASG replabels, etc.
docstr_tok: ["Normalize","tokens","by","handling","CTC","blank",",","ASG","replabels",",","etc","."]
code: def _get_tokens(self, idxs: List[int]):
      """Normalize tokens by handling CTC blank, ASG replabels, etc."""
  
      idxs = (g[0] for g in itertools.groupby(idxs))
      if self.silence < 0:
          idxs = filter(
              lambda x: x != self.blank and x != self.silence, idxs
          )
      else:
          idxs = filter(lambda x: x != self.blank, idxs)
      idxs = list(idxs)
      if idxs[0] == self.silence:
          idxs = idxs[1:]
      if idxs[-1] == self.silence:
          idxs = idxs[:-1]
  
      return torch.LongTensor(idxs)
  
imports: import itertools
  import math
  from typing import Iterable, List, Optional, Tuple, Union
  import numpy
  import torch
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.core.classes import NeuralModule, typecheck
  from nemo.core.neural_types import LengthsType, LogprobsType, NeuralType, PredictionsType
label_desc: Use image node_id 2 for calling the FlashLightKenLMBeamSearchDecoder obj's underlying member method code with example usage: obj._get_tokens(idxs) and returns: torch