code: def test_split_offset(
      entry,
      offset,
      prediction_length,
      test_label_start,
  ):
      training_dataset, test_template = split([entry], offset=offset)
  
      training_entry = next(iter(training_dataset))
      test_input, test_label = next(
          iter(
              test_template.generate_instances(
                  prediction_length=prediction_length
              )
          )
      )
  
      if offset < 0:
          training_size = (len(entry["target"]) + offset,)
      else:
          training_size = (offset,)
  
      assert training_entry["start"] == entry["start"]
      assert training_entry["target"].shape == training_size
  
      assert test_input["start"] == entry["start"]
      assert test_input["target"].shape == training_size
  
      assert test_label["start"] == test_label_start
      assert test_label["target"].shape == (prediction_length,)
  
file_path: gluonts/test/dataset/test_split.py
imports: import numpy
  import pandas
  import pytest
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.split import OffsetSplitter, periods_between, split, slice_data_entry
label_desc: Use image node_id 6 for calling a global function with example usage: test_split_offset(entry, offset, prediction_length, test_label_start) without return types