code: def test_time_frame():
      assert tf.eq_to(tf)
      assert len(tf) == 10
      assert len(tf[:4]) == 4
      assert len(tf[-4:]) == 4
      assert tf.tdims
  
      assert tf["target"].name == "target"
      assert np.array_equal(tf["target"], target)
      assert np.array_equal(tf["feat"], feat)
  
      assert tf.metadata == {"x": 42}
  
      tf2 = tf.stack(["target", "feat"], "stacked")
      assert not tf.eq_to(tf2)
      assert tf2.columns["stacked"].shape == (3, 10)
      assert tf2.columns["stacked"].shape == (3, 10)
      assert "target" not in tf2.columns
      assert "feat" not in tf2.columns
      assert tf2.metadata == {"x": 42}
      assert tf2.tdims
  
      tf3 = tf.like({"foo": np.full(10, 7)})
      assert tf3.columns["foo"].shape == (10,)
      assert "target" not in tf3.columns
      assert "feat" not in tf3.columns
      assert tf3.metadata == {"x": 42}
      assert tf3.tdims
  
file_path: gluonts/test/zebras/test_timeframe.py
imports: import pytest
  import numpy
  import gluonts.zebras
label_desc: Use image node_id 2 for calling a global function with example usage: test_time_frame() without return types