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,
          time_series_fields=[FieldName.OBSERVED_VALUES],
          past_length=self.context_length,
          future_length=self.future_length,
          output_NTC=False,
      )
  
imports: from typing import List, Optional
  import numpy
  import torch
  import torch.nn
  from gluonts.core.component import validated
  from gluonts.dataset.field_names import FieldName
  from gluonts.torch.util import copy_parameters
  from gluonts.torch.model.predictor import PyTorchPredictor
  from gluonts.model.predictor import Predictor
  from gluonts.transform import InstanceSplitter, ValidationSplitSampler, TestSplitSampler, Transformation, Chain, ExpectedNumInstanceSampler, AddObservedValuesIndicator, AsNumpyArray
  from pts.model import PyTorchEstimator
  from pts import Trainer
  from pts.model.utils import get_module_forward_input_names
  from .lstnet_network import LSTNetTrain, LSTNetPredict
label_desc: Use image node_id 3 for calling the LSTNetEstimator obj's underlying member method code with example usage: obj.create_instance_splitter(mode) and returns: InstanceSplitter