class_docstr: A unit test to test ancillary utils in setting up a cartesian product GP. 
class_docstr_tok: ["A","unit","test","to","test","ancillary","utils","in","setting","up","a","cartesian","product","GP","."]
docstr: Tests creation of the function. 
docstr_tok: ["Tests","creation","of","the","function","."]
code: def test_multi_fidelity_function_loading_and_processing_with_config(
      self,
  ):
      """Tests creation of the function."""
      self.report(
          "Testing multi-fidelity function evals before/after packing with config."
      )
      num_samples = 25
      for idx, (dcf, raw_func) in enumerate(
          self.domain_fidel_synthetic_functions
      ):
          config = cp_domain_utils.load_config_file(dcf)
          proc_func = cp_domain_utils.get_processed_func_from_raw_func_via_config(
              raw_func, config
          )
          # Draw samples
          proc_samples_1 = cp_domain_utils.sample_from_config_space(
              config, num_samples
          )
          raw_samples_1 = [
              cp_domain_utils.get_raw_from_processed_via_config(
                  x, config
              )
              for x in proc_samples_1
          ]
          proc_samples_2 = [
              cp_domain_utils.get_processed_from_raw_via_config(
                  x, config
              )
              for x in raw_samples_1
          ]
          raw_samples_2 = [
              cp_domain_utils.get_raw_from_processed_via_config(
                  x, config
              )
              for x in proc_samples_2
          ]
          # Compute function values
          proc_vals_1 = [proc_func(z, x) for (z, x) in proc_samples_1]
          proc_vals_2 = [proc_func(z, x) for (z, x) in proc_samples_2]
          raw_vals_1 = [raw_func(z, x) for (z, x) in raw_samples_1]
          raw_vals_2 = [raw_func(z, x) for (z, x) in raw_samples_2]
          err_1 = np.linalg.norm(
              np.array(proc_vals_1) - np.array(raw_vals_1)
          )
          err_2 = np.linalg.norm(
              np.array(proc_vals_1) - np.array(proc_vals_2)
          )
          err_3 = np.linalg.norm(
              np.array(proc_vals_1) - np.array(raw_vals_2)
          )
          err = err_1 + err_2 + err_3
          assert err < 1e-4 * np.linalg.norm(np.array(proc_vals_1))
          self.report(
              "[%d/%d] Testing multi-fidelity function evals for %s, Error=%0.5f."
              % (
                  idx + 1,
                  len(self.domain_fidel_synthetic_functions),
                  dcf,
                  err,
              ),
              "test_result",
          )
      self.report("", "")
  
imports: import os
  import numpy
  from .None import cp_domain_utils
  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 get_idxs_from_list_of_lists
label_desc: Use image node_id 10 for calling the CPDomainUtilsTestCase obj's underlying member method code with example usage: obj.test_multi_fidelity_function_loading_and_processing_with_config() without return types