code: def forward(
      self,
      past_target: torch.Tensor,
      past_observed_values: torch.Tensor,
      future_target: torch.Tensor,
  ) -> torch.Tensor:
      ret, scale = super().forward(past_target, past_observed_values)
  
      if self.horizon:
          future_target = future_target[..., -1:]
  
      loss = self.loss_fn(ret * scale, future_target)
      return loss
  
file_path: gluonts/src/gluonts/nursery/robust-mts-attack/pts/model/lstnet/lstnet_network.py
imports: from typing import List, Tuple, Optional
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from pts.modules import MeanScaler, NOPScaler
label_desc: Use image node_id 2 for calling the LSTNetTrain obj's underlying member method code with example usage: obj.forward(past_target, past_observed_values, future_target) and returns: loss