code: def forward(
      self,
      ctx_input: torch.Tensor,
      tgt_input: Optional[torch.Tensor] = None,
      states: Optional[List[torch.Tensor]] = None,
  ):
      ctx_encodings, states = self.encoder_lstm(ctx_input, states)
  
      if tgt_input is not None:
          tgt_encodings, _ = self.decoder_lstm(tgt_input, states)
          encodings = torch.cat((ctx_encodings, tgt_encodings), dim=1)
          skip = torch.cat((ctx_input, tgt_input), dim=1)
      else:
          encodings = ctx_encodings
          skip = ctx_input
  
      if self.add_skip:
          skip = self.skip_proj(skip)
      encodings = self.gate(encodings)
      encodings = self.lnorm(skip + encodings)
      return encodings
  
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from gluonts.core.component import validated
  from gluonts.torch.modules.feature import FeatureEmbedder
label_desc: Use image node_id 2 for calling the TemporalFusionEncoder obj's underlying member method code with example usage: obj.forward(ctx_input, tgt_input, states) and returns: encodings