code: def test_time_series():
      ts = zb.time_series(
          target, index=index, name="target", metadata={"x": 42}
      )
      assert len(ts) == len(target)
      assert (ts == target).all()
      assert ts.tdim
  
      assert len(ts) == 10
      assert len(ts[:4]) == 4
      assert len(ts[-4:]) == 4
  
      assert ts.metadata == {"x": 42}
      assert ts.name == "target"
  
file_path: gluonts/test/zebras/test_timeframe.py
imports: import pytest
  import numpy
  import gluonts.zebras
label_desc: Use image node_id 1 for calling a global function with example usage: test_time_series() without return types