code: def get_data_frame_with_item_index(
      item_list: List[Union[str, int]],
      data_length: int = 20,
      freq: str = "H",
      start_date: str = "2022-01-01",
      columns: List[str] = ["target"],
      data_generation: str = "random",
  ):
      assert data_generation in ["random", "sequential"]
      if data_generation == "random":
          data = [
              random.random()
              for _ in range(len(item_list) * data_length)
          ]
      elif data_generation == "sequential":
          data = [e for e in range(len(item_list) * data_length)]
  
      return TimeSeriesDataFrame(
          pd.DataFrame(
              index=pd.MultiIndex.from_product(
                  [
                      item_list,
                      pd.date_range(
                          pd.Timestamp(start_date),  # noqa
                          freq=freq,
                          periods=data_length,
                      ),
                  ],
                  names=(ITEMID, TIMESTAMP),
              ),
              data=data,
              columns=columns,
          )
      )
  
file_path: autogluon/timeseries/tests/unittests/common.py
imports: import random
  from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  from gluonts.dataset.common import ListDataset
  from autogluon.timeseries.dataset import TimeSeriesDataFrame
  from autogluon.timeseries.dataset.ts_dataframe import ITEMID, TIMESTAMP
  from autogluon.timeseries.metrics import TimeSeriesScorer
label_desc: Use image node_id 1 for calling a global function with example usage: get_data_frame_with_item_index(item_list, data_length, freq, start_date, columns, data_generation) and returns: TimeSeriesDataFrame