code: def test_forking_sequence_splitter() -> None:
      len_ts = 20
      ds = make_dataset(1, len_ts)
      enc_len = 5
      dec_len = 3
  
      trans = transform.Chain(
          [
              transform.AddAgeFeature(
                  target_field=FieldName.TARGET,
                  output_field="age",
                  pred_length=dec_len,
              ),
              ForkingSequenceSplitter(
                  instance_sampler=ValidationSplitSampler(
                      min_future=dec_len
                  ),
                  enc_len=enc_len,
                  dec_len=dec_len,
                  encoder_series_fields=["age"],
              ),
          ]
      )
  
      out = trans(ds, is_train=True)
      transformed_data = next(iter(out))
  
      future_target = np.array(
          [
              [13.0, 14.0, 15.0],
              [14.0, 15.0, 16.0],
              [15.0, 16.0, 17.0],
              [16.0, 17.0, 18.0],
              [17.0, 18.0, 19.0],
          ]
      )
      assert (
          np.linalg.norm(
              future_target - transformed_data["future_target"]
          )
          < 1e-5
      ), "the forking sequence target should be computed correctly."
  
      age = np.log10(2.0 + np.arange(len_ts))
      assert (
          np.linalg.norm(
              age[-(enc_len + dec_len) : -dec_len]
              - transformed_data["past_age"].flatten()
          )
          < 1e-5
      ), "the forking sequence past feature should be computed correctly."
  
file_path: gluonts/test/mx/model/seq2seq/test_forking_sequence_splitter.py
imports: import numpy
  import pytest
  from gluonts import transform
  from gluonts.dataset.common import ListDataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.mx.model.seq2seq._transform import ForkingSequenceSplitter
  from gluonts.time_feature import time_features_from_frequency_str
  from gluonts.transform import TestSplitSampler
  from gluonts.transform import ValidationSplitSampler
label_desc: Use image node_id 2 for calling a global function with example usage: test_forking_sequence_splitter() without return types