code: def test_xshardstsdataset_roll_multiple_id(self):
      shards_multiple = read_csv(
          os.path.join(self.resource_path, "multiple.csv")
      )
      horizon = random.randint(1, 10)
      lookback = random.randint(1, 20)
  
      tsdata = XShardsTSDataset.from_xshards(
          shards_multiple,
          dt_col="datetime",
          target_col="value",
          extra_feature_col=["extra feature"],
          id_col="id",
      )
  
      with pytest.raises(RuntimeError):
          tsdata.to_xshards()
  
      # roll train
      tsdata.roll(lookback=lookback, horizon=horizon)
      shards_numpy = tsdata.to_xshards()
      collected_numpy = shards_numpy.collect()  # collect and valid
      x = np.concatenate(
          [
              collected_numpy[i]["x"]
              for i in range(len(collected_numpy))
          ],
          axis=0,
      )
      y = np.concatenate(
          [
              collected_numpy[i]["y"]
              for i in range(len(collected_numpy))
          ],
          axis=0,
      )
      assert x.shape == ((50 - lookback - horizon + 1) * 2, lookback, 2)
      assert y.shape == ((50 - lookback - horizon + 1) * 2, horizon, 1)
  
      tsdata.roll(
          lookback=lookback,
          horizon=horizon,
          feature_col=["extra feature"],
          target_col="value",
      )
      shards_numpy = tsdata.to_xshards()
      collected_numpy = shards_numpy.collect()  # collect and valid
      x = np.concatenate(
          [
              collected_numpy[i]["x"]
              for i in range(len(collected_numpy))
          ],
          axis=0,
      )
      y = np.concatenate(
          [
              collected_numpy[i]["y"]
              for i in range(len(collected_numpy))
          ],
          axis=0,
      )
      assert x.shape == ((50 - lookback - horizon + 1) * 2, lookback, 2)
      assert y.shape == ((50 - lookback - horizon + 1) * 2, horizon, 1)
  
      tsdata.roll(
          lookback=lookback,
          horizon=horizon,
          feature_col=[],
          target_col="value",
      )
      shards_numpy = tsdata.to_xshards()
      collected_numpy = shards_numpy.collect()  # collect and valid
      x = np.concatenate(
          [
              collected_numpy[i]["x"]
              for i in range(len(collected_numpy))
          ],
          axis=0,
      )
      y = np.concatenate(
          [
              collected_numpy[i]["y"]
              for i in range(len(collected_numpy))
          ],
          axis=0,
      )
      assert x.shape == ((50 - lookback - horizon + 1) * 2, lookback, 1)
      assert y.shape == ((50 - lookback - horizon + 1) * 2, horizon, 1)
  
      # roll test
      horizon = 0
      lookback = random.randint(1, 20)
  
      tsdata.roll(lookback=lookback, horizon=horizon)
      shards_numpy = tsdata.to_xshards()
      collected_numpy = shards_numpy.collect()  # collect and valid
      x = np.concatenate(
          [
              collected_numpy[i]["x"]
              for i in range(len(collected_numpy))
          ],
          axis=0,
      )
      assert x.shape == ((50 - lookback - horizon + 1) * 2, lookback, 2)
  
imports: import pytest
  import numpy
  import pandas
  import random
  import os
  from unittest import TestCase
  from bigdl.chronos.data import TSDataset
  from bigdl.chronos.utils import LazyImport
  from ...None import op_torch, op_distributed
  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 TestXShardsTSDataset obj's underlying member method code with example usage: obj.test_xshardstsdataset_roll_multiple_id() without return types