code: def create_transformation(self) -> Transformation:
      return Chain(
          [
              AsNumpyArray(
                  field=FieldName.TARGET,
                  expected_ndim=2,
              ),
              # maps the target to (1, T)
              # if the target data is uni dimensional
              ExpandDimArray(
                  field=FieldName.TARGET,
                  axis=None,
              ),
              AddObservedValuesIndicator(
                  target_field=FieldName.TARGET,
                  output_field=FieldName.OBSERVED_VALUES,
              ),
              AddTimeFeatures(
                  start_field=FieldName.START,
                  target_field=FieldName.TARGET,
                  output_field=FieldName.FEAT_TIME,
                  time_features=self.time_features,
                  pred_length=self.prediction_length,
              ),
              VstackFeatures(
                  output_field=FieldName.FEAT_TIME,
                  input_fields=[FieldName.FEAT_TIME],
              ),
              SetFieldIfNotPresent(
                  field=FieldName.FEAT_STATIC_CAT, value=[0]
              ),
              TargetDimIndicator(
                  field_name="target_dimension_indicator",
                  target_field=FieldName.TARGET,
              ),
              AsNumpyArray(
                  field=FieldName.FEAT_STATIC_CAT, expected_ndim=1
              ),
          ]
      )
  
file_path: gluonts/src/gluonts/nursery/robust-mts-attack/pts/model/time_grad/time_grad_estimator.py
imports: from typing import List, Optional
  import torch
  from gluonts.dataset.field_names import FieldName
  from gluonts.time_feature import TimeFeature
  from gluonts.torch.model.predictor import PyTorchPredictor
  from gluonts.torch.util import copy_parameters
  from gluonts.model.predictor import Predictor
  from gluonts.transform import Transformation, Chain, InstanceSplitter, ExpectedNumInstanceSampler, ValidationSplitSampler, TestSplitSampler, RenameFields, AsNumpyArray, ExpandDimArray, AddObservedValuesIndicator, AddTimeFeatures, VstackFeatures, SetFieldIfNotPresent, TargetDimIndicator
  from pts import Trainer
  from pts.feature import fourier_time_features_from_frequency, lags_for_fourier_time_features_from_frequency
  from pts.model import PyTorchEstimator
  from pts.model.utils import get_module_forward_input_names
  from .time_grad_network import TimeGradTrainingNetwork, TimeGradPredictionNetwork
label_desc: Use image node_id 2 for calling the TimeGradEstimator obj's underlying member method code with example usage: obj.create_transformation() and returns: Chain