code: def test_time_frame_split_out_of_bounds():
      # Check extreme cases work, where either past length or future length is
      # empty.
      assert len(tf.split(0).past) == 0
      assert len(tf.split(len(tf)).future) == 0
  
      assert len(tf.split(tf.index.start).past) == 0
      assert len(tf.split(tf.index.start + len(tf)).future) == 0
  
      with pytest.raises(ValueError):
          tf.split(len(tf) + 1)
  
      with pytest.raises(Exception):
          tf.split(tf.index.start + len(tf) + 1)
  
      with pytest.raises(ValueError):
          tf.split(-(len(tf) + 1))
  
      with pytest.raises(Exception):
          tf.split(tf.index.start - 1)
  
file_path: gluonts/test/zebras/test_timeframe.py
imports: import pytest
  import numpy
  import gluonts.zebras
label_desc: Use image node_id 4 for calling a global function with example usage: test_time_frame_split_out_of_bounds() without return types