code: def random_ts(num_ts: int, periods: int, freq: str):
      index = pd.period_range(
          start="22-03-2020", periods=periods, freq=freq
      )
  
      return pd.concat(
          [
              pd.Series(
                  data=np.random.random(size=len(index)), index=index
              )
              for _ in range(num_ts)
          ],
          axis=1,
      )
  
file_path: gluonts/test/mx/model/deepvar_hierarchical/test_train_prediction_with_hts.py
imports: from typing import Optional
  import numpy
  import pandas
  import pytest
  from gluonts.dataset.hierarchical import HierarchicalTimeSeries
  from gluonts.mx.model.deepvar_hierarchical import DeepVARHierarchicalEstimator
  from gluonts.mx.trainer import Trainer
label_desc: Use image node_id 1 for calling a global function with example usage: random_ts(num_ts, periods, freq) and returns: pd