class_docstr: Generate sinus time series that ramp up and reach a certain amplitude, and
  level and have additional spikes on each sunday.
  
  TODO: This could be converted to a RecipeDataset to avoid code duplication.
class_docstr_tok: ["Generate","sinus","time","series","that","ramp","up","and","reach","a","certain","amplitude",",","and","level","and","have","additional","spikes","on","each","sunday",".","TODO",":","This","could","be","converted","to","a","RecipeDataset","to","avoid","code","duplication","."]
docstr: :param num_series: number of time series generated in the train and
         test set
  :param prediction_length:
  :param freq_str:
  :param length_low: minimum length of a time series, must be larger than
         prediction_length
  :param length_high: maximum length of a time series
  :param min_val: min value of a time series
  :param max_val: max value of a time series
  :param is_integer: whether the dataset has integers or not
  :param proportion_missing_values:
  :param is_noise: whether to add noise
  :param is_scale: whether to add scale
  :param percentage_unique_timestamps: percentage of random start dates
      bounded between 0 and 1
  :param is_out_of_bounds_date: determines whether to use very old start
      dates and start dates far in the future
  :param seasonality: Seasonality of the generated data. If not given
      uses default seasonality for frequency
  :param clip_values: if True the values will be clipped to
      [min_val, max_val], otherwise linearly scales them
code: def __init__(
      self,
      num_series: int = 100,
      prediction_length: int = 20,
      freq_str: str = "D",
      length_low: int = 30,
      length_high: int = 200,
      min_val: float = -10000,
      max_val: float = 10000,
      is_integer: bool = False,
      proportion_missing_values: float = 0,
      is_noise: bool = True,
      is_scale: bool = True,
      percentage_unique_timestamps: float = 0.07,
      is_out_of_bounds_date: bool = False,
      seasonality: Optional[int] = None,
      clip_values: bool = False,
  ) -> None:
      """
      :param num_series: number of time series generated in the train and
             test set
      :param prediction_length:
      :param freq_str:
      :param length_low: minimum length of a time series, must be larger than
             prediction_length
      :param length_high: maximum length of a time series
      :param min_val: min value of a time series
      :param max_val: max value of a time series
      :param is_integer: whether the dataset has integers or not
      :param proportion_missing_values:
      :param is_noise: whether to add noise
      :param is_scale: whether to add scale
      :param percentage_unique_timestamps: percentage of random start dates
          bounded between 0 and 1
      :param is_out_of_bounds_date: determines whether to use very old start
          dates and start dates far in the future
      :param seasonality: Seasonality of the generated data. If not given
          uses default seasonality for frequency
      :param clip_values: if True the values will be clipped to
          [min_val, max_val], otherwise linearly scales them
      """
      assert length_low > prediction_length
      super().__init__(freq_str)
      self.num_series = num_series
      self.prediction_length = prediction_length
      self.length_low = length_low
      self.length_high = length_high
      self.freq_str = freq_str
      self.min_val = min_val
      self.max_val = max_val
      self.is_integer = is_integer
      self.proportion_missing_values = proportion_missing_values
      self.is_noise = is_noise
      self.is_scale = is_scale
      self.percentage_unique_timestamps = percentage_unique_timestamps
      self.is_out_of_bounds_date = is_out_of_bounds_date
      self.seasonality = seasonality
      self.clip_values = clip_values
  
imports: import math
  import random
  from abc import abstractmethod
  from typing import Callable, Dict, List, NamedTuple, Optional, Tuple, Union, cast
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  from pandas.tseries.offsets import BaseOffset, Week
  from gluonts.dataset.artificial.recipe import BinaryHolidays, BinaryMarkovChain, Constant, ForEachCat, Lag, LinearTrend, RandomCat, RandomGaussian, Stack, generate, take_as_list
  from gluonts.dataset.common import BasicFeatureInfo, CategoricalFeatureInfo, DataEntry, Dataset, ListDataset, MetaData, TrainDatasets
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.stat import DatasetStatistics, calculate_dataset_statistics
label_desc: Use image node_id 1 to create a new ComplexSeasonalTimeSeries object from inherited base classes: ArtificialDataset with example: obj = ComplexSeasonalTimeSeries(num_series, prediction_length, freq_str, length_low, length_high, min_val, max_val, is_integer, proportion_missing_values, is_noise, is_scale, percentage_unique_timestamps, is_out_of_bounds_date, seasonality, clip_values)