code: def get_synthetic_data(
      model_name=None, num_groups=8, mean_boundary=1
  ):
      assert num_groups > 1
      prediction_length = 1
      context_length = 5
      num_time_steps = 1
      # device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
      device = "cpu"
      net = SimpleFeedForwardEstimator(
          freq="1H",
          prediction_length=prediction_length,
          context_length=context_length,
      ).create_training_network(device)
      delta = 2 * mean_boundary / num_groups
      dataset_group = []
      whole_data_list = []
      start = pd.Timestamp("01-01-2019", freq="1H")
      for gid in range(num_groups):
          parameter_mean = -mean_boundary + gid * delta
          # change the parameters of the model
          for p in net.parameters():
              p.data = torch.normal(
                  parameter_mean, 0.1, size=p.data.shape
              )
          ts = torch.normal(0, 0.1, size=(1, context_length))
          for num_ts in range(num_time_steps):
              ts_slice = torch.Tensor(ts[0][-context_length:]).view(
                  1, context_length
              )
              prediction = net.get_distr(ts_slice).sample((5000,))
              prediction = sum(prediction) / len(prediction)
              ts = torch.cat([ts, prediction], dim=1)
          whole_data_list.append(
              {
                  "target": ts.view(
                      len(ts[0]),
                  )[context_length:],
                  "start": start,
              }
          )
          dataset_group.append(
              ListDataset(
                  [
                      {
                          "target": ts.view(
                              len(ts[0]),
                          )[context_length:],
                          "start": start,
                      }
                  ],
                  freq="1H",
              )
          )
      dataset = ListDataset(whole_data_list, freq="1H")
      dataset_group = [dataset] + dataset_group
  
      # save to files
      with open("synthetic_whole_data.csv", "wb") as output:
          pickle.dump(dataset, output)
  
      with open("synthetic_group_data.csv", "wb") as output:
          pickle.dump(dataset_group, output)
      return True
  
imports: from pts.dataset.repository.datasets import get_dataset, dataset_recipes
  from pts.dataset.utils import to_pandas
  import numpy
  import pandas
  from pts.dataset import ListDataset
  import torch
  from pts.model.simple_feedforward import SimpleFeedForwardEstimator
  import pickle
  import json
  import random
label_desc: Use image node_id 10 for calling a global function with example usage: get_synthetic_data(model_name, num_groups, mean_boundary) and returns: True