class_docstr: A Fitter for multi-fidelity GPs in Cartesian Product spaces. 
class_docstr_tok: ["A","Fitter","for","multi-fidelity","GPs","in","Cartesian","Product","spaces","."]
docstr: Constructor. 
docstr_tok: ["Constructor","."]
code: def __init__(
      self,
      ZZ,
      XX,
      YY,
      config=None,
      fidel_space=None,
      domain=None,
      fidel_space_kernel_ordering=None,
      domain_kernel_ordering=None,
      fidel_space_lists_of_dists=None,
      domain_lists_of_dists=None,
      fidel_space_dist_computers=None,
      domain_dist_computers=None,
      options=None,
      reporter=None,
  ):
      """Constructor."""
      # pylint: disable=too-many-arguments
      # Load options
      reporter = get_reporter(reporter)
      options = load_options(
          cartesian_product_mf_gp_args, partial_options=options
      )
      # Read from config
      if config is not None:
          if isinstance(config, str):
              from ..exd.exd_utils import load_config_file
  
              config = load_config_file(config)
          self.config = config
          self.fidel_space = config.fidel_space
          self.domain = config.domain
          self.fidel_space_kernel_ordering = (
              config.fidel_space_orderings.kernel_ordering
          )
          self.domain_kernel_ordering = (
              config.domain_orderings.kernel_ordering
          )
          self.fidel_space_num_domains = self.fidel_space.num_domains
      elif (
          fidel_space is not None
          and domain is not None
          and fidel_space_kernel_ordering is not None
          and domain_kernel_ordering is not None
      ):
          self.config = None
          self.fidel_space = fidel_space
          self.domain = domain
          self.fidel_space_kernel_ordering = fidel_space_kernel_ordering
          self.domain_kernel_ordering = domain_kernel_ordering
      else:
          raise ValueError(
              "Provide either config or parameters fidel_space, domain"
              + " fidel_space_kernel_ordering, and domain_kernel_ordering."
          )
      self.fidel_space_num_domains = self.fidel_space.num_domains
      self.domain_num_domains = self.domain.num_domains
      # Create a structure to store kernel parameters
      self.fidel_space_kernel_params_for_each_domain = [
          Namespace() for _ in range(self.fidel_space_num_domains)
      ]
      self.domain_kernel_params_for_each_domain = [
          Namespace() for _ in range(self.domain_num_domains)
      ]
      # Store lists of dists & dist_computers
      if fidel_space_lists_of_dists is None:
          fidel_space_lists_of_dists = [
              None
          ] * self.fidel_space_num_domains
      if domain_lists_of_dists is None:
          domain_lists_of_dists = [None] * self.domain_num_domains
      if fidel_space_dist_computers is None:
          fidel_space_dist_computers = [
              None
          ] * self.fidel_space_num_domains
      if domain_dist_computers is None:
          domain_dist_computers = [None] * self.domain_num_domains
      self.fidel_space_lists_of_dists = fidel_space_lists_of_dists
      self.domain_lists_of_dists = domain_lists_of_dists
      self.fidel_space_dist_computers = fidel_space_dist_computers
      self.domain_dist_computers = domain_dist_computers
      for idx in range(self.fidel_space_num_domains):
          self.fidel_space_kernel_params_for_each_domain[
              idx
          ].list_of_dists = fidel_space_lists_of_dists[idx]
          self.fidel_space_kernel_params_for_each_domain[
              idx
          ].dist_computer = fidel_space_dist_computers[idx]
      for idx in range(self.domain_num_domains):
          self.domain_kernel_params_for_each_domain[
              idx
          ].list_of_dists = domain_lists_of_dists[idx]
          self.domain_kernel_params_for_each_domain[
              idx
          ].dist_computer = domain_dist_computers[idx]
      # Call super constructor
      super(CPMFGPFitter, self).__init__(ZZ, XX, YY, options, reporter)
  
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 CPMFGPFitter object from inherited base classes: mf_gp with example: obj = CPMFGPFitter(ZZ, XX, YY, config, fidel_space, domain, fidel_space_kernel_ordering, domain_kernel_ordering, fidel_space_lists_of_dists, domain_lists_of_dists, fidel_space_dist_computers, domain_dist_computers, options, reporter)