code: def test_time_frame_resize():
      # lengthen
      tf2 = tf.resize(15, pad_value=99)
      assert len(tf2) == 15
      assert (tf2["target"][:5] == 99).all()
  
      tf2 = tf.resize(15, pad_value=99, pad="l")
      assert len(tf2) == 15
      assert (tf2["target"][:5] == 99).all()
  
      tf2 = tf.resize(15, pad_value=99, pad="r")
      assert len(tf2) == 15
      assert (tf2["target"][-5:] == 99).all()
  
      # shorten
      tf2 = tf.resize(5, pad_value=99)
      assert len(tf2) == 5
      assert (tf2["target"] == np.arange(5)).all()
  
      tf2 = tf.resize(5, pad_value=99, skip="r")
      assert len(tf2) == 5
      assert (tf2["target"] == np.arange(5)).all()
  
      tf2 = tf.resize(5, pad_value=99, skip="l")
      assert len(tf2) == 5
      assert (tf2["target"] == np.arange(5, 10)).all()
  
file_path: gluonts/test/zebras/test_timeframe.py
imports: import pytest
  import numpy
  import gluonts.zebras
label_desc: Use image node_id 5 for calling a global function with example usage: test_time_frame_resize() without return types