code: def gen_synthetic_data(
      len=10000,
      sine_amplitude=10.0,
      angular_freq=0.01,
      noise_amplitude=0.01,
      noise_scale=1.0,
      seed=1,
      time_freq="D",
      **kwargs,
  ):
      """
      Generate dataset according to sine function with a Gaussian noise.
      Datetime is generated according to `time_freq` with the current time as endtime.
  
      >>> from bigdl.chronos.data import gen_synthetic_data
      >>> tsdata_gen = gen_synthetic_data()
  
      :param len: int, the number indicates the dataset size. Default to 10000.
      :param sine_amplitude: float, the number indicates amplitude of the sine function.
             Default to 10.0.
      :param angular_freq: float, the number indicates angular frequency of the sine function.
             Default to 0.01.
      :param noise_amplitude: float, the number indicates amplitude of the Gaussian noise.
             Default to 0.01.
      :param noise_scale: float, the number indicates the standard deviation of the Gaussian noise
             while the mean is set to 0. Default to 1.0.
      :param seed: int, random seed for generating Gaussian noise. Default to 1.
      :param time_freq: str, the frequency of the generated dataframe, default to 'D'(calendar day
             frequency). The frequency can be anything from the pandas list of frequency strings here:
             https://pandas.pydata.org/docs/user_guide/timeseries.html#timeseries-offset-aliases
      :param kwargs: extra arguments passed to initialize the tsdataset,
             including with_split, val_ratio and test_ratio.
  
      :return: a TSDataset instance when with_split is set to False,
               three TSDataset instances when with_split is set to True.
      """
      from bigdl.chronos.data.utils.utils import _check_type
  
      _check_type(len, "len", int)
      _check_type(sine_amplitude, "sine_amplitude", float)
      _check_type(angular_freq, "angular_freq", float)
      _check_type(noise_amplitude, "noise_amplitude", float)
      _check_type(noise_scale, "noise_scale", float)
      _check_type(seed, "seed", int)
      _check_type(time_freq, "time_freq", str)
  
      gen_x = np.linspace(0, len * angular_freq, len)
      np.random.seed(seed)
      gen_y = sine_amplitude * np.sin(
          gen_x
      ) + noise_amplitude * np.random.normal(0, noise_scale, len)
      df = pd.DataFrame(gen_y, columns=["target"])
      endtime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
      df.insert(
          0,
          "datetime",
          pd.date_range(end=endtime, periods=len, freq=time_freq),
      )
  
      return TSDataset.from_pandas(
          df, dt_col="datetime", target_col="target", **kwargs
      )
  
imports: import numpy
  import pandas
  import time
  from bigdl.chronos.data.utils.public_dataset import PublicDataset
  from bigdl.chronos.data.tsdataset import TSDataset
label_desc: Use image node_id 2 for calling a global function with example usage: gen_synthetic_data(len, sine_amplitude, angular_freq, noise_amplitude, noise_scale, seed, time_freq) and returns: TSDataset