code: def test_tsdata_multi_unscale_numpy_torch_load(self):
      lookback = random.randint(1, 10)
      horizon = random.randint(1, 20)
      batch_size = random.randint(16, 32)
      df = get_multi_id_ts_df()
      df_test = get_multi_id_ts_df()
      tsdata_train = TSDataset.from_pandas(
          df,
          target_col="value",
          dt_col="datetime",
          extra_feature_col="extra feature",
          id_col="id",
      )
      tsdata_test = TSDataset.from_pandas(
          df_test,
          target_col="value",
          dt_col="datetime",
          extra_feature_col="extra feature",
          id_col="id",
      )
      # roll is True.
      from sklearn.preprocessing import StandardScaler
  
      stand = StandardScaler()
      for tsdata in [tsdata_train, tsdata_test]:
          tsdata.scale(stand, fit=tsdata is tsdata_train)
  
      test_loader = tsdata_test.to_torch_data_loader(
          batch_size=batch_size,
          roll=True,
          lookback=lookback,
          horizon=horizon,
      )
      import torch
      from torch.utils.data.dataloader import DataLoader
  
      test_loader = DataLoader(
          test_loader.dataset, batch_size=batch_size, shuffle=False
      )
  
      batch_load_list = []
      for _, y_batch in test_loader:
          batch_load_list.append(y_batch)
      y_test = torch.cat(batch_load_list, dim=0)
      pred = np.copy(y_test.numpy())  # sanity check
  
      unscaled_pred = tsdata_train.unscale_numpy(pred)
      unscaled_y_test = tsdata_train.unscale_numpy(y_test.numpy())
  
      _, unscaled_y_test_reproduce = (
          tsdata_test.unscale()
          .roll(lookback=lookback, horizon=horizon)
          .to_numpy()
      )
  
      assert_array_almost_equal(
          unscaled_pred, unscaled_y_test_reproduce
      )
      assert_array_almost_equal(
          unscaled_y_test, unscaled_y_test_reproduce
      )
  
      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 12 for calling the TestTSDataset obj's underlying member method code with example usage: obj.test_tsdata_multi_unscale_numpy_torch_load() without return types