class_docstr: This class is modified based on
  https://github.com/zimmerrol/keras-utility-layer-collection/blob/master/kulc/attention.py.
  The idea of the implementation is based on the paper:
      "Effective Approaches to Attention-based Neural Machine Translation" by Luong et al.
  This layer is an attention layer, which can be wrapped around arbitrary RNN layers.
  This way, after each time step an attention vector is calculated
  based on the current output of the LSTM and the entire input time series.
  This attention vector is then used as a weight vector to choose special values
  from the input data. This data is then finally concatenated to the next input time step's
  data. On this a linear transformation in the same space as the input data's space
  is performed before the data is fed into the RNN cell again.
  This technique is similar to the input-feeding method described in the paper cited
code: def step(self, x, states):
      h = states[1]
      # states[1] necessary?
  
      # equals K.dot(X, self._W1) + self._b2 with X.shape=[bs, T, input_dim]
      total_x_prod = states[-1]
      # comes from the constants (equals the input sequence)
      X = states[-2]
  
      # expand dims to add the vector which is only valid for this time step
      # to total_x_prod which is valid for all time steps
      hw = K.expand_dims(K.dot(h, self._W2), 1)
      additive_atn = total_x_prod + hw
      attention = K.softmax(K.dot(additive_atn, self._V), axis=1)
      x_weighted = K.sum(attention * X, [1])
  
      x = K.dot(K.concatenate([x, x_weighted], 1), self._W3) + self._b3
  
      h, new_states = self.layer.cell.call(x, states[:-2])
  
      return h, new_states
  
imports: import pickle
  import numpy
  import time
  from tensorflow.keras.models import Model
  from tensorflow.keras.layers import Reshape, Dense, Dropout, Add, Permute, RNN, GRUCell
  from tensorflow.keras.layers import Input, InputSpec, Wrapper, Lambda, Conv2D, multiply, Softmax
  from tensorflow.keras.initializers import TruncatedNormal, Constant
  import tensorflow.keras.backend
  import tensorflow
  from bigdl.chronos.metric.forecast_metrics import Evaluator
label_desc: Use image node_id 7 for calling the AttentionRNNWrapper obj's underlying member method code with example usage: obj.step(x, states) and returns: h,  new_states