code: def test_tsdataset_roll_multi_id(self):
      df = get_multi_id_ts_df()
      horizon = random.randint(1, 10)
      lookback = random.randint(1, 20)
  
      tsdata = TSDataset.from_pandas(
          df,
          dt_col="datetime",
          target_col="value",
          extra_feature_col=["extra feature"],
          id_col="id",
      )
  
      # test train
      tsdata.roll(lookback=lookback, horizon=horizon, id_sensitive=True)
      x, y = tsdata.to_numpy()
      assert x.shape == ((50 - lookback - horizon + 1), lookback, 4)
      assert y.shape == ((50 - lookback - horizon + 1), horizon, 2)
  
      tsdata.roll(lookback=lookback, horizon=horizon)
      x, y = tsdata.to_numpy()
      assert x.shape == ((50 - lookback - horizon + 1) * 2, lookback, 2)
      assert y.shape == ((50 - lookback - horizon + 1) * 2, horizon, 1)
  
      # horizon list.
      horizon_list = [1, 3, 5]
      tsdata.roll(lookback=lookback, horizon=horizon_list)
      x, y = tsdata.to_numpy()
      assert x.shape == (
          (50 - lookback - max(horizon_list) + 1) * 2,
          lookback,
          2,
      )
      assert y.shape == (
          (50 - lookback - max(horizon_list) + 1) * 2,
          len(horizon_list),
          1,
      )
  
      horizon_list = [1, 5, 9]
      tsdata.roll(
          lookback=lookback, horizon=horizon_list, id_sensitive=True
      )
      x, y = tsdata.to_numpy()
      assert x.shape == (
          (50 - lookback - max(horizon_list) + 1),
          lookback,
          4,
      )
      assert y.shape == (
          (50 - lookback - max(horizon_list) + 1),
          len(horizon_list),
          2,
      )
  
      # target multi.
      tsdata = TSDataset.from_pandas(
          df,
          dt_col="datetime",
          target_col=["value", "extra feature"],
          id_col="id",
      )
      tsdata.roll(
          lookback=lookback, horizon=horizon, id_sensitive=False
      )
      x, y = tsdata.to_numpy()
      assert x.shape == ((50 - lookback - horizon + 1) * 2, lookback, 2)
      assert y.shape == ((50 - lookback - horizon + 1) * 2, horizon, 2)
  
      tsdata._check_basic_invariants()
  
imports: import pytest
  import numpy
  import pandas
  import random
  import tempfile
  import os
  import shutil
  from test.zoo.pipeline.utils.test_utils import ZooTestCase
  from zoo.chronos.data import TSDataset
  from pandas.testing import assert_frame_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 7 for calling the TestTSDataset obj's underlying member method code with example usage: obj.test_tsdataset_roll_multi_id() without return types