class_docstr: RNN + Attention
  Input Shape: [batch_size, steps, features]
  Output Shape: [batch_size, units]
class_docstr_tok: ["RNN","+","Attention","Input","Shape",":","[","batch_size",",","steps",",","features","]","Output","Shape",":","[","batch_size",",","units","]"]
code: def call(self, inputs, training=None, mask=None):
      if "lstm" in self.cell_type.lower():
          (
              out,
              forward_h,
              forward_c,
              backward_h,
              backward_c,
          ) = self.sen_encoder(inputs)
          state_h = tf.keras.layers.concatenate([forward_h, backward_h])
          state_c = tf.keras.layers.concatenate([forward_c, backward_c])
          states = tf.nn.rnn_cell.LSTMStateTuple(state_h, state_c)
      else:
          out, forward_h, backward_h = self.sen_encoder(inputs)
          states = tf.keras.layers.concatenate([forward_h, backward_h])
      return out, states
  
imports: from absl import logging
  import delta.compat
  import delta
  from delta.layers.base_layer import Layer
  from tensorflow_addons import seq2seq
label_desc: Use image node_id 4 for calling the RnnEncoder obj's underlying member method code with example usage: obj.call(inputs, training, mask) and returns: out,  states