code: def generate_random_dataset(
      num_ts: int,
      start_time: str,
      freq: str,
      min_length: int,
      max_length: int,
  ) -> Dataset:
      start_timestamp = pd.Period(start_time, freq=freq)
      for _ in range(num_ts):
          ts_length = np.random.randint(low=min_length, high=max_length)
          target = np.random.uniform(size=(ts_length,))
          data = {"target": target, "start": start_timestamp}
          yield data
  
file_path: gluonts/test/ext/naive_2/test_predictors.py
imports: import tempfile
  from pathlib import Path
  import numpy
  import pandas
  import pytest
  from flaky import flaky
  from gluonts.dataset.artificial import constant_dataset
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.util import forecast_start
  from gluonts.evaluation import Evaluator, backtest_metrics
  from gluonts.ext.naive_2 import Naive2Predictor
  from gluonts.model.predictor import Predictor
  from gluonts.model.seasonal_naive import SeasonalNaivePredictor
  from gluonts.pydantic import PositiveInt
  from gluonts.time_feature import get_seasonality
label_desc: Use image node_id 1 for calling a global function with example usage: generate_random_dataset(num_ts, start_time, freq, min_length, max_length) without return types