class_docstr: Multi-fidelity GP Class for Cartesian Product GPs. 
class_docstr_tok: ["Multi-fidelity","GP","Class","for","Cartesian","Product","GPs","."]
docstr: Returns the training kernel matrix. 
docstr_tok: ["Returns","the","training","kernel","matrix","."]
code: def _get_training_kernel_matrix(self):
      """Returns the training kernel matrix."""
      if self.fidel_space_kernel is None or self.domain_kernel is None:
          return self.kernel(self.X, self.X)
      else:
          KF = self._get_train_kernel_matrix_from_data_and_lists_of_dists(
              self.ZZ,
              self.fidel_space_kernel,
              self.fidel_space_lists_of_dists,
          )
          KD = self._get_train_kernel_matrix_from_data_and_lists_of_dists(
              self.XX, self.domain_kernel, self.domain_lists_of_dists
          )
          return self.kernel_scale * KF * KD
  
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 6 for calling the CPMFGP obj's underlying member method code with example usage: obj._get_training_kernel_matrix() and returns: self, unknown