code: def random_periodic(
      max_target_dim: int = 16, prediction_length: int = 24
  ):
      """
  
      :param max_target_dim:
      :param prediction_length:
      :param noise_scale: the scale factor for the noise w.r.t the mean of the input, sigma_noise = input_mean*noise_scale
      :param levels: each input timeseries is drawn from normal distributions with mean=l, for each l in levels
      :return:
      """
      num_periods = 100
      levels = np.random.uniform(
          low=0, high=100, size=(max_target_dim,)
      )
      levels = np.expand_dims(levels, axis=1) * np.ones(
          (max_target_dim, prediction_length)
      )
  
      noise_level = 1.0
      seasonal_noise = np.random.uniform(
          low=0, high=noise_level, size=(max_target_dim,)
      )
  
      seasonal_noise = np.expand_dims(seasonal_noise, axis=1) * np.ones(
          (max_target_dim, prediction_length)
      )
      seed_values = np.random.normal(
          loc=levels, scale=seasonal_noise * levels
      )
  
      values = np.hstack([seed_values for _ in range(num_periods)])
  
      levels = np.hstack([levels for _ in range(num_periods)])
      noise = np.random.normal(
          loc=0 * levels, scale=levels / 5, size=values.shape
      )
  
      return make_dataset(values + noise, prediction_length)
  
imports: from collections import OrderedDict
  import numpy
  import os
  import logging
  from typing import NamedTuple
  import pandas
  from pathlib import Path
  import tarfile
  from gluonts.dataset.common import Dataset, load_datasets
  from gluonts.dataset.repository import default_dataset_path
label_desc: Use image node_id 5 for calling a global function with example usage: random_periodic(max_target_dim, prediction_length) and returns: make_dataset