code: def gen_mf_gp_test_data():
      """Generates test data."""
      # pylint: disable=too-many-locals
      # dataset 1
      fzx = lambda z, x: (x**2).sum(axis=1) + (z**2).sum(axis=1)
      dim_z = 2
      dim_x = 3
      N = 20
      (
          Z_tr,
          X_tr,
          Y_tr,
          ZX_tr,
          Z_te,
          X_te,
          Y_te,
          ZX_te,
      ) = _gen_datasets_from_func(fzx, N, dim_z, dim_x)
      fidel_kernel = kernel.SEKernel(
          dim=dim_z, scale=1, dim_bandwidths=0.5
      )
      domain_kernel = kernel.SEKernel(
          dim=dim_x, scale=1, dim_bandwidths=0.5
      )
      kernel_scale = 2
      tune_noise = True
      dataset_1 = Namespace(
          Z_tr=Z_tr,
          X_tr=X_tr,
          Y_tr=Y_tr,
          ZX_tr=ZX_tr,
          Z_te=Z_te,
          X_te=X_te,
          Y_te=Y_te,
          ZX_te=ZX_te,
          fidel_kernel=fidel_kernel,
          domain_kernel=domain_kernel,
          kernel_scale=kernel_scale,
          tune_noise=tune_noise,
      )
      # dataset 2
      fx = (
          lambda x: -70
          * (x + 0.01)
          * (x - 0.31)
          * (x + 0.51)
          * (x - 0.71)
          * (x - 0.98)
      )
      fzx = lambda z, x: (np.exp((z - 0.8) ** 2) * fx(x)).sum(axis=1)
      N = 100
      (
          Z_tr,
          X_tr,
          Y_tr,
          ZX_tr,
          Z_te,
          X_te,
          Y_te,
          ZX_te,
      ) = _gen_datasets_from_func(fzx, N, 1, 1)
      fidel_kernel = kernel.SEKernel(dim=1, scale=1, dim_bandwidths=1.0)
      domain_kernel = kernel.SEKernel(
          dim=1, scale=1, dim_bandwidths=0.25
      )
      kernel_scale = 2
      tune_noise = True
      dataset_2 = Namespace(
          Z_tr=Z_tr,
          X_tr=X_tr,
          Y_tr=Y_tr,
          ZX_tr=ZX_tr,
          Z_te=Z_te,
          X_te=X_te,
          Y_te=Y_te,
          ZX_te=ZX_te,
          fidel_kernel=fidel_kernel,
          domain_kernel=domain_kernel,
          kernel_scale=kernel_scale,
          tune_noise=tune_noise,
      )
      # return all datasets
      return [dataset_1, dataset_2]
  
imports: from __future__ import division
  from argparse import Namespace
  from copy import deepcopy
  import numpy
  from .None import kernel
  from .unittest_euclidean_gp import fit_se_gp_with_dataset, fit_matern_gp_with_dataset, fit_poly_gp_with_dataset
  from .None import euclidean_gp
  from ..utils.base_test_class import BaseTestClass, execute_tests
  from ..utils.general_utils import compute_average_sq_prediction_error
  from ..utils.option_handler import load_options
label_desc: Use image node_id 5 for calling a global function with example usage: gen_mf_gp_test_data() and returns: list