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: Create decoder hidden states.
  
  Args:
      new_states: Decoder hidden states.
                      [B x ((N, 1, D_dec), (N, 1, D_dec) or None)]
  
  Returns:
      states: Decoder hidden states. ((N, B, D_dec), (N, B, D_dec) or None)
docstr_tok: ["Create","decoder","hidden","states",".","Args",":","new_states",":","Decoder","hidden","states",".","[","B","x","(","(","N",",","1",",","D_dec",")",",","(","N",",","1",",","D_dec",")","or","None",")","]","Returns",":","states",":","Decoder","hidden","states",".","(","(","N",",","B",",","D_dec",")",",","(","N",",","B",",","D_dec",")","or","None",")"]
code: def create_batch_states(
      self,
      new_states: List[Tuple[torch.Tensor, Optional[torch.Tensor]]],
  ) -> Tuple[torch.Tensor, Optional[torch.Tensor]]:
      """Create decoder hidden states.
  
      Args:
          new_states: Decoder hidden states.
                          [B x ((N, 1, D_dec), (N, 1, D_dec) or None)]
  
      Returns:
          states: Decoder hidden states. ((N, B, D_dec), (N, B, D_dec) or None)
  
      """
      return (
          torch.cat([s[0] for s in new_states], dim=1),
          torch.cat([s[1] for s in new_states], dim=1)
          if self.dtype == "lstm"
          else None,
      )
  
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 9 for calling the RNNDecoder obj's underlying member method code with example usage: obj.create_batch_states(new_states) and returns: torch,  unknown