class_docstr: Multi-fidelity GP Class for Cartesian Product GPs. 
class_docstr_tok: ["Multi-fidelity","GP","Class","for","Cartesian","Product","GPs","."]
docstr: Constructor. 
docstr_tok: ["Constructor","."]
code: def __init__(
      self,
      ZZ,
      XX,
      YY,
      mf_kernel,
      mean_func,
      noise_var,
      kernel_scale=None,
      fidel_space_kernel=None,
      domain_kernel=None,
      fidel_space_lists_of_dists=None,
      domain_lists_of_dists=None,
      build_posterior=True,
      reporter=None,
      handle_non_psd_kernels="project_first",
  ):
      """Constructor."""
      # pylint: disable=too-many-arguments
      if mf_kernel is None:
          mf_kernel = CartesianProductKernel(
              kernel_scale, [fidel_space_kernel, domain_kernel]
          )
      self.kernel_scale = kernel_scale
      self.fidel_space_kernel = fidel_space_kernel
      self.domain_kernel = domain_kernel
      # Now check the lists_of_dists
      if fidel_space_lists_of_dists is None:
          fidel_space_lists_of_dists = [None] * mf_kernel[0].num_kernels
      if domain_lists_of_dists is None:
          domain_lists_of_dists = [None] * mf_kernel[0].num_kernels
      self.fidel_space_lists_of_dists = fidel_space_lists_of_dists
      self.domain_lists_of_dists = domain_lists_of_dists
      # Finally call the super constructor.
      super(CPMFGP, self).__init__(
          ZZ,
          XX,
          YY,
          mf_kernel,
          mean_func,
          noise_var,
          build_posterior=build_posterior,
          reporter=reporter,
          handle_non_psd_kernels=handle_non_psd_kernels,
      )
  
imports: from __future__ import print_function
  from argparse import Namespace
  import numpy
  from ..exd import domains
  from ..exd.cp_domain_utils import load_cp_domain_from_config_file
  from .None import gp_core, mf_gp
  from .euclidean_gp import get_euclidean_integral_gp_kernel_with_scale, prep_euclidean_integral_kernel_hyperparams
  from .kernel import CartesianProductKernel, HammingKernel
  from ..utils.general_utils import get_idxs_from_list_of_lists
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 1 to create a new CPMFGP object from inherited base classes: mf_gp with example: obj = CPMFGP(ZZ, XX, YY, mf_kernel, mean_func, noise_var, kernel_scale, fidel_space_kernel, domain_kernel, fidel_space_lists_of_dists, domain_lists_of_dists, build_posterior, reporter, handle_non_psd_kernels)