class_docstr: the Mem-LSTM of SkiM --
  Note: This is taken from the SkiM implementation in ESPNet toolkit and modified for compability with SpeechBrain.
  
  Arguments:
  ---------
  hidden_size: int,
      Dimension of the hidden state.
  dropout: float,
      dropout ratio. Default is 0.
  bidirectional: bool,
      Whether the LSTM layers are bidirectional.
      Default is False.
  mem_type: 'hc', 'h', 'c', or 'id'.
      This controls whether the hidden (or cell) state of
      SegLSTM will be processed by MemLSTM.
      In 'id' mode, both the hidden and cell states will
      be identically returned.
  norm_type: 'gln', 'cln'
      This selects the type of normalization
      cln is for causal implemention
  
  Example
  ---------
  >>> x = (torch.randn(1, 5, 64), torch.randn(1, 5, 64))
  >>> block = MemLSTM(64)
  >>> x = block(x, 5)
  >>> x[0].shape
  torch.Size([1, 5, 64])
code: def __init__(
      self,
      hidden_size,
      dropout=0.0,
      bidirectional=False,
      mem_type="hc",
      norm_type="cln",
  ):
      super().__init__()
      self.hidden_size = hidden_size
      self.bidirectional = bidirectional
      self.input_size = (int(bidirectional) + 1) * hidden_size
      self.mem_type = mem_type
  
      assert mem_type in [
          "hc",
          "h",
          "c",
          "id",
      ], f"only support 'hc', 'h', 'c' and 'id', current type: {mem_type}"
  
      if mem_type in ["hc", "h"]:
          self.h_net = SBRNNBlock(
              input_size=self.input_size,
              hidden_channels=self.hidden_size,
              num_layers=1,
              outsize=self.input_size,
              rnn_type="LSTM",
              dropout=dropout,
              bidirectional=bidirectional,
          )
  
          self.h_norm = select_norm(
              norm=norm_type, dim=self.input_size, shape=3, eps=EPS
          )
      if mem_type in ["hc", "c"]:
          self.c_net = SBRNNBlock(
              input_size=self.input_size,
              hidden_channels=self.hidden_size,
              num_layers=1,
              outsize=self.input_size,
              rnn_type="LSTM",
              dropout=dropout,
              bidirectional=bidirectional,
          )
  
          self.c_norm = select_norm(
              norm=norm_type, dim=self.input_size, shape=3, eps=EPS
          )
  
imports: import torch
  import torch.nn
  from speechbrain.lobes.models.dual_path import select_norm
  from speechbrain.lobes.models.transformer.Transformer import TransformerEncoder, PositionalEncoding, get_lookahead_mask
  import speechbrain.nnet.RNN
  import copy
label_desc: Use image node_id 1 to create a new MemLSTM object from inherited base classes: nn with example: obj = MemLSTM(hidden_size, dropout, bidirectional, mem_type, norm_type)