code: def gen_cpgp_test_data():
      """Generates CPGP test data."""
      file_dir = os.path.dirname(os.path.realpath(__file__))
      test_data_dir = os.path.dirname(file_dir)
      # pylint: disable=too-many-statements
      # pylint: disable=too-many-locals
      # TODO: test against a naive GP in each of these cases
      # Now define the datasets --------------------------------------------------------------
      ret = []
      n_train = 200
      n_test = 300
      # Dataset 1
      domain_file_name = (
          test_data_dir + "/" + "test_data/example_configs/eg01.json"
      )
      func = (
          lambda x: x[0][0] ** 2
          + 2 * x[1][0] * x[0][0]
          + 3 * x[1][0]
          + 2.1
      )
      bounds = np.array([[-5, 10], [0, 15]])
      X_train = map_to_bounds(np.random.random((n_train, 2)), bounds)
      X_test = map_to_bounds(np.random.random((n_train, 2)), bounds)
      X_train = [[x] for x in X_train]
      X_test = [[x] for x in X_test]
      ret.append(
          get_test_dataset(domain_file_name, func, X_train, X_test)
      )
      # Dataset 2
      domain_file_name = (
          test_data_dir + "/" + "test_data/park2_4/config.json"
      )
      func = park2_4
      bounds = np.array([[0, 1], [0, 1], [103, 194], [10, 11]])
      X_tr_num = map_to_bounds(
          np.random.random((n_train, len(bounds))), bounds
      )
      X_te_num = map_to_bounds(
          np.random.random((n_test, len(bounds))), bounds
      )
      X_tr_disc = np.random.choice(
          ["rabbit", "dog", "hamster", "gerbil", "ferret"], n_train
      )
      X_te_disc = np.random.choice(
          ["rabbit", "dog", "hamster", "gerbil", "ferret"], n_test
      )
      X_train = [
          [[x[0], x[1], x[3]], [int(x[2])], [xd]]
          for (x, xd) in zip(X_tr_num, X_tr_disc)
      ]
      X_test = [
          [[x[0], x[1], x[3]], [int(x[2])], [xd]]
          for (x, xd) in zip(X_te_num, X_te_disc)
      ]
      ret.append(
          get_test_dataset(domain_file_name, func, X_train, X_test)
      )
      # Dataset 3
      domain_file_name = (
          test_data_dir + "/" + "test_data/park1_3/config.json"
      )
      func = park1_3
      bounds = np.array([[10, 16], [0, 1], [0, 1]])
      x2_elems = [
          4,
          10,
          23,
          45,
          78,
          87.1,
          91.8,
          99,
          75.7,
          28.1,
          3.141593,
      ]
      modify_func = lambda x1, x2: [
          [x1[0]],
          [round(x1[1] * 20) / 20, round(x1[2] * 20) / 20, x2],
      ]
      X_train_1 = map_to_bounds(
          np.random.random((n_train, len(bounds))), bounds
      )
      X_train_2 = np.random.choice(x2_elems, n_train)
      X_train = [
          modify_func(x1, x2) for (x1, x2) in zip(X_train_1, X_train_2)
      ]
      X_test_1 = map_to_bounds(
          np.random.random((n_test, len(bounds))), bounds
      )
      X_test_2 = np.random.choice(x2_elems, n_test)
      X_test = [
          modify_func(x1, x2) for (x1, x2) in zip(X_test_1, X_test_2)
      ]
      ret.append(
          get_test_dataset(domain_file_name, func, X_train, X_test)
      )
      # Return
      return ret
  
imports: from argparse import Namespace
  import numpy
  import os
  from time import time
  from ..exd.cp_domain_utils import load_cp_domain_from_config_file, get_processed_func_from_raw_func_for_cp_domain, get_processed_func_from_raw_func_via_config, load_config_file, sample_from_config_space
  from .None import cartesian_product_gp
  from ..test_data.park1_3.park1_3 import park1_3
  from ..test_data.park1_3.park1_3_mf import park1_3_mf
  from ..test_data.park2_4.park2_4 import park2_4
  from ..test_data.park2_4.park2_4_mf import park2_4_mf
  from ..utils.base_test_class import BaseTestClass, execute_tests
  from ..utils.general_utils import map_to_bounds, get_idxs_from_list_of_lists
label_desc: Use image node_id 2 for calling a global function with example usage: gen_cpgp_test_data() and returns: ret