code: def create_instance_splitter(self, mode: str):
      assert mode in ["training", "validation", "test"]
  
      instance_sampler = {
          "training": self.train_sampler,
          "validation": self.validation_sampler,
          "test": TestSplitSampler(),
      }[mode]
  
      return InstanceSplitter(
          target_field=FieldName.TARGET,
          is_pad_field=FieldName.IS_PAD,
          start_field=FieldName.START,
          forecast_start_field=FieldName.FORECAST_START,
          instance_sampler=instance_sampler,
          past_length=self.history_length,
          future_length=self.prediction_length,
          time_series_fields=[
              FieldName.FEAT_TIME,
              FieldName.OBSERVED_VALUES,
          ],
      ) + (
          RenameFields(
              {
                  f"past_{FieldName.TARGET}": f"past_{FieldName.TARGET}_cdf",
                  f"future_{FieldName.TARGET}": f"future_{FieldName.TARGET}_cdf",
              }
          )
      )
  
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 3 for calling the TimeGradEstimator obj's underlying member method code with example usage: obj.create_instance_splitter(mode) and returns: unknown