code: def get_synthetic_data_mlp(
      model_name=None,
      num_groups=8,
      mean_boundary=0.5,
      num_duplicates=16,
  ):
      assert num_groups > 1
      prediction_length = 1
      context_length = 12
      device = "cpu"
      dataset_group = []
      whole_data_list = []
      start = pd.Timestamp("01-01-2019", freq="1H")
      for gid in range(num_groups):
          net = SimpleFeedForwardEstimator(
              freq="1H",
              prediction_length=prediction_length,
              context_length=context_length,
          ).create_training_network(device)
          for p in net.parameters():
              p.data = torch.normal(0, 0.1, size=p.data.shape)
          pattern_group = []
          # for j in range(num_duplicates):
          # ts = torch.Uniform(0, 1, size=(1, context_length))
          while True:
              ts = torch.rand(size=(1, context_length))
              ts_slice = torch.Tensor(ts[0][-context_length:]).view(
                  1, context_length
              )
              prediction = net.get_distr(ts_slice).sample((1000,))
              prediction = sum(prediction) / len(prediction)
              if abs(torch.norm(prediction)) <= 1:
                  break
          ts = torch.cat([ts, prediction], dim=1)
          ts = ts.view(
              len(ts[0]),
          )  # [context_length:]
          for j in range(num_duplicates):
              ts_sample = ts + torch.normal(0, 0.1, size=ts.shape)
              whole_data_list.append(
                  {"target": ts_sample, "start": start}
              )
              pattern_group.append(
                  {"target": ts_sample, "start": start}
              )
          dataset_group.append(ListDataset(pattern_group, freq="1H"))
      random.shuffle(whole_data_list)
      random.shuffle(dataset_group)
      dataset = ListDataset(whole_data_list, freq="1H")
      ret = []
      ret.append(dataset)
      ret.append(dataset)
      dataset_group = [dataset] + dataset_group
      dataset_group = [dataset] + dataset_group
  
      # save to files
      with open("synthetic_mlp_whole_data.csv", "wb") as output:
          pickle.dump(ret, output)
  
      with open("synthetic_mlp_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 11 for calling a global function with example usage: get_synthetic_data_mlp(model_name, num_groups, mean_boundary, num_duplicates) and returns: True