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","."]
code: def forward(
      self,
      x: torch.Tensor,
      hx: Optional[List[Tuple[torch.Tensor, torch.Tensor]]] = None,
  ) -> Tuple[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]]:
      hx = self._parse_hidden_state(hx)
  
      hs = []
      cs = []
      rnn_idx = 0
      for layer in self.layers:
          if isinstance(layer, torch.nn.Dropout):
              x = layer(x)
          else:
              x, h_out = layer(x, hx=hx[rnn_idx])
              hs.append(h_out[0])
              cs.append(h_out[1])
              rnn_idx += 1
              del h_out
  
      h_0 = torch.stack(hs, dim=0)
      c_0 = torch.stack(cs, dim=0)
      return x, (h_0, c_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 2 for calling the BNRNNSum obj's underlying member method code with example usage: obj.forward(x, hx) and returns: x,  h_0,  c_0