code: def test_negative_offset_splitter():
      dataset = [
          {
              "item_id": 0,
              "start": pd.Period("2021-03-04", freq="D"),
              "target": np.ones(shape=(100,)),
          },
          {
              "item_id": 1,
              "start": pd.Period("2021-03-04", freq="D"),
              "target": 2 * np.ones(shape=(50,)),
          },
      ]
  
      train, test_gen = OffsetSplitter(offset=-7).split(dataset)
  
      assert [len(t["target"]) for t in train] == [93, 43]
      assert [
          len(t["target"]) + len(s["target"])
          for t, s in test_gen.generate_instances(prediction_length=7)
      ] == [100, 50]
  
      train, test_gen = OffsetSplitter(offset=-21).split(dataset)
  
      assert [len(t["target"]) for t in train] == [79, 29]
      assert [
          len(t["target"]) + len(s["target"])
          for t, s in test_gen.generate_instances(
              prediction_length=7, windows=3
          )
      ] == [
          86,
          93,
          100,
          36,
          43,
          50,
      ]
  
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 3 for calling a global function with example usage: test_negative_offset_splitter() without return types