class_docstr: (RNN-)Transducer decoder module.
  
  Args:
      vocab_size: Output dimension.
      layers_type: (RNN-)Decoder layers type.
      num_layers: Number of decoder layers.
      hidden_size: Number of decoder units per layer.
      dropout: Dropout rate for decoder layers.
      dropout_embed: Dropout rate for embedding layer.
      embed_pad: Embed/Blank symbol ID.
docstr: One-step forward hypothesis.
  
  Args:
      hyp: Hypothesis.
      cache: Pairs of (dec_out, state) for each label sequence. (key)
  
  Returns:
      dec_out: Decoder output sequence. (1, D_dec)
      new_state: Decoder hidden states. ((N, 1, D_dec), (N, 1, D_dec))
      label: Label ID for LM. (1,)
docstr_tok: ["One-step","forward","hypothesis",".","Args",":","hyp",":","Hypothesis",".","cache",":","Pairs","of","(","dec_out",",","state",")","for","each","label","sequence",".","(","key",")","Returns",":","dec_out",":","Decoder","output","sequence",".","(","1",",","D_dec",")","new_state",":","Decoder","hidden","states",".","(","(","N",",","1",",","D_dec",")",",","(","N",",","1",",","D_dec",")",")","label",":","Label","ID","for","LM",".","(","1",",",")"]
code: def score(
      self, hyp: Hypothesis, cache: Dict[str, Any]
  ) -> Tuple[
      torch.Tensor,
      Tuple[torch.Tensor, Optional[torch.Tensor]],
      torch.Tensor,
  ]:
      """One-step forward hypothesis.
  
      Args:
          hyp: Hypothesis.
          cache: Pairs of (dec_out, state) for each label sequence. (key)
  
      Returns:
          dec_out: Decoder output sequence. (1, D_dec)
          new_state: Decoder hidden states. ((N, 1, D_dec), (N, 1, D_dec))
          label: Label ID for LM. (1,)
  
      """
      label = torch.full(
          (1, 1), hyp.yseq[-1], dtype=torch.long, device=self.device
      )
  
      str_labels = "_".join(list(map(str, hyp.yseq)))
  
      if str_labels in cache:
          dec_out, dec_state = cache[str_labels]
      else:
          dec_emb = self.embed(label)
  
          dec_out, dec_state = self.rnn_forward(dec_emb, hyp.dec_state)
          cache[str_labels] = (dec_out, dec_state)
  
      return dec_out[0][0], dec_state, label[0]
  
file_path: espnet/espnet2/asr/decoder/transducer_decoder.py
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from typeguard import check_argument_types
  from espnet2.asr.decoder.abs_decoder import AbsDecoder
  from espnet2.asr.transducer.beam_search_transducer import ExtendedHypothesis, Hypothesis
label_desc: Use image node_id 6 for calling the TransducerDecoder obj's underlying member method code with example usage: obj.score(hyp, cache) and returns: dec_out,  dec_state,  label