class_docstr: RNN wrapper with optional batch norm.
  Instantiates an RNN. If it is an LSTM it initialises the forget gate
  bias =`lstm_gate_bias`. Optionally applies a batch normalisation layer to
  the input with the statistics computed over all time steps.  If dropout > 0
  then it is applied to all layer outputs except the last.
class_docstr_tok: ["RNN","wrapper","with","optional","batch","norm",".","Instantiates","an","RNN",".","If","it","is","an","LSTM","it","initialises","the","forget","gate","bias","=","`","lstm_gate_bias","`",".","Optionally","applies","a","batch","normalisation","layer","to","the","input","with","the","statistics","computed","over","all","time","steps",".","If","dropout",">","0","then","it","is","applied","to","all","layer","outputs","except","the","last","."]
docstr: Dealing w. hidden state:
  Typically in pytorch: (h_0, c_0)
      h_0 = ``[num_layers * num_directions, batch, hidden_size]``
      c_0 = ``[num_layers * num_directions, batch, hidden_size]``
code: def _parse_hidden_state(
      self, hx: Optional[Tuple[torch.Tensor, torch.Tensor]]
  ) -> Union[List[None], List[Tuple[torch.Tensor, torch.Tensor]]]:
      """
      Dealing w. hidden state:
      Typically in pytorch: (h_0, c_0)
          h_0 = ``[num_layers * num_directions, batch, hidden_size]``
          c_0 = ``[num_layers * num_directions, batch, hidden_size]``
      """
      if hx is None:
          return [None] * self.rnn_layers
      else:
          h_0, c_0 = hx
  
          if h_0.shape[0] != self.rnn_layers:
              raise ValueError(
                  "Provided initial state value `h_0` must be of shape : "
                  "[num_layers * num_directions, batch, hidden_size]"
              )
  
          return [(h_0[i], c_0[i]) for i in range(h_0.shape[0])]
  
imports: import math
  from typing import List, Optional, Tuple, Union
  import numpy
  import torch
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling the BNRNNSum obj's underlying member method code with example usage: obj._parse_hidden_state(hx) and returns: unknown, unknown