code: def forward(self, x):
      # x must be BLD
      if self.method == "mean":
          self.scale = x.abs()[:, : -self.horizon].mean(dim=1)[
              :, None, :
          ]
          return x / self.scale
      elif self.method == "last":
          self.scale = x.abs()[:, -self.horizon - 1][:, None, :]
          return x / self.scale
      return x
  
imports: import math
  from functools import partial
  import torch
  import torch.nn
  import torch.nn.functional
  from einops import rearrange
  from opt_einsum import contract
label_desc: Use image node_id 2 for calling the TSNormalization obj's underlying member method code with example usage: obj.forward(x) and returns: x, unknown, unknown