code: def forward(self, inputs, hidden):
      inputs = inputs.unbind(0)
      outputs = []
  
      for t in range(len(inputs)):
          # attention on windows
          hx, cx = (tensor.squeeze(0) for tensor in hidden)
          hx_rep = hx.repeat(len(inputs), 1, 1)
          cx_rep = cx.repeat(len(inputs), 1, 1)
          x = torch.cat((inputs, hx_rep, cx_rep), dim=-1)
          l = self.attn_layer(x)
          beta = self.softmax(l)
          context = torch.bmm(
              beta.permute(1, 2, 0), inputs.permute(1, 0, 2)
          ).squeeze(1)
          out, hidden = self.cell(context, hidden)
          outputs += [out]
      outputs = torch.stack(outputs)
      return outputs, hidden
  
imports: from typing import List, Optional
  import torch
  import torch.nn
  from ..losses.pytorch import MAE
  from ..common._base_recurrent import BaseRecurrent
  from ..common._modules import MLP
label_desc: Use image node_id 2 for calling the AttentiveLSTMLayer obj's underlying member method code with example usage: obj.forward(inputs, hidden) and returns: outputs,  hidden