class_docstr: RNN decoder module.
  
  Args:
      vocab_size: Vocabulary size.
      embed_size: Embedding size.
      hidden_size: Hidden size..
      rnn_type: Decoder layers type.
      num_layers: Number of decoder layers.
      dropout_rate: Dropout rate for decoder layers.
      embed_dropout_rate: Dropout rate for embedding layer.
      embed_pad: Embedding padding symbol ID.
docstr: Encode source label sequences.
  
  Args:
      x: RNN input sequences. (B, D_emb)
      state: Decoder hidden states. ((N, B, D_dec), (N, B, D_dec) or None)
  
  Returns:
      x: RNN output sequences. (B, D_dec)
      (h_next, c_next): Decoder hidden states.
                          (N, B, D_dec), (N, B, D_dec) or None)
docstr_tok: ["Encode","source","label","sequences",".","Args",":","x",":","RNN","input","sequences",".","(","B",",","D_emb",")","state",":","Decoder","hidden","states",".","(","(","N",",","B",",","D_dec",")",",","(","N",",","B",",","D_dec",")","or","None",")","Returns",":","x",":","RNN","output","sequences",".","(","B",",","D_dec",")","(","h_next",",","c_next",")",":","Decoder","hidden","states",".","(","N",",","B",",","D_dec",")",",","(","N",",","B",",","D_dec",")","or","None",")"]
code: def rnn_forward(
      self,
      x: torch.Tensor,
      state: Tuple[torch.Tensor, Optional[torch.Tensor]],
  ) -> Tuple[torch.Tensor, Tuple[torch.Tensor, Optional[torch.Tensor]]]:
      """Encode source label sequences.
  
      Args:
          x: RNN input sequences. (B, D_emb)
          state: Decoder hidden states. ((N, B, D_dec), (N, B, D_dec) or None)
  
      Returns:
          x: RNN output sequences. (B, D_dec)
          (h_next, c_next): Decoder hidden states.
                              (N, B, D_dec), (N, B, D_dec) or None)
  
      """
      h_prev, c_prev = state
      h_next, c_next = self.init_state(x.size(0))
  
      for layer in range(self.dlayers):
          if self.dtype == "lstm":
              x, (
                  h_next[layer : layer + 1],
                  c_next[layer : layer + 1],
              ) = self.rnn[layer](
                  x,
                  hx=(
                      h_prev[layer : layer + 1],
                      c_prev[layer : layer + 1],
                  ),
              )
          else:
              x, h_next[layer : layer + 1] = self.rnn[layer](
                  x, hx=h_prev[layer : layer + 1]
              )
  
          x = self.dropout_rnn[layer](x)
  
      return x, (h_next, c_next)
  
file_path: espnet/espnet2/asr_transducer/decoder/rnn_decoder.py
imports: from typing import List, Optional, Tuple
  import torch
  from typeguard import check_argument_types
  from espnet2.asr_transducer.beam_search_transducer import Hypothesis
  from espnet2.asr_transducer.decoder.abs_decoder import AbsDecoder
label_desc: Use image node_id 3 for calling the RNNDecoder obj's underlying member method code with example usage: obj.rnn_forward(x, state) and returns: x,  h_next,  c_next