class_docstr: Unit test for synthetic function. 
class_docstr_tok: ["Unit","test","for","synthetic","function","."]
docstr: Tests that the function values correspond to those given. The unit test
  test_all_synthetic_functions calls this for each of the test functions in
  a loop.
docstr_tok: ["Tests","that","the","function","values","correspond","to","those","given",".","The","unit","test","test_all_synthetic_functions","calls","this","for","each","of","the","test","functions","in","a","loop","."]
code: def _test_for_func_vals(self, func_caller, unnorm_func_caller):
      """Tests that the function values correspond to those given. The unit test
      test_all_synthetic_functions calls this for each of the test functions in
      a loop.
      """
      # In this unit test, fc_ denotes for quantities corresponding to the (normalised)
      # func_caller. ufc_ denotes quantities corresponding to the unnorm_func_caller.
      # Test with func_caller and func
      test_points = np.random.random(
          (self.num_test_points, func_caller.domain.dim)
      )
      raw_test_points = func_caller.get_raw_domain_coords(test_points)
      if not func_caller.is_mf():
          raw_test_vals = [
              func_caller.func(elem) for elem in raw_test_points
          ]
      else:
          test_fidels = np.random.random(
              (self.num_test_points, func_caller.fidel_space.dim)
          )
          raw_test_fidels = func_caller.get_raw_fidel_coords(
              test_fidels
          )
          raw_test_vals = [
              func_caller.func(rfidel, rpoint)
              for (rfidel, rpoint) in zip(
                  raw_test_fidels, raw_test_points
              )
          ]
      # First the normalised function caller
      fc_noise_scale = (
          0.0
          if func_caller.noise_scale is None
          else func_caller.noise_scale
      )
      if not func_caller.is_mf():
          fc_test_vals, _, _ = self._get_test_vals_from_func_caller(
              func_caller, test_points
          )
      else:
          fc_test_vals, _, _ = self._get_test_vals_from_mf_func_caller(
              func_caller, test_points, test_fidels
          )
      fc_test_err = self._test_for_test_err(
          raw_test_vals, fc_test_vals, fc_noise_scale
      )
      # Test with unnormalised function caller
      ufc_noise_scale = (
          0.0
          if func_caller.noise_scale is None
          else func_caller.noise_scale
      )
      if not func_caller.is_mf():
          ufc_test_vals, _, _ = self._get_test_vals_from_func_caller(
              unnorm_func_caller, raw_test_points
          )
      else:
          ufc_test_vals, _, _ = self._get_test_vals_from_mf_func_caller(
              unnorm_func_caller, raw_test_points, raw_test_fidels
          )
      ufc_test_err = self._test_for_test_err(
          raw_test_vals, ufc_test_vals, ufc_noise_scale
      )
      # Test for normalised and unnormalised callers
      fc_ufc_noise_scale = fc_noise_scale + ufc_noise_scale
      fc_ufc_err = self._test_for_test_err(
          fc_test_vals, ufc_test_vals, fc_ufc_noise_scale
      )
      return fc_test_err, ufc_test_err, fc_ufc_err
  
imports: import os
  import numpy
  from .None import cp_domain_utils, experiment_caller
  from ..utils import euclidean_synthetic_functions
  from ..utils.base_test_class import BaseTestClass, execute_tests
  from ..utils.ancillary_utils import get_list_of_floats_as_str
  from ..test_data.park2_4.park2_4 import park2_4
  from ..test_data.park2_4.park2_4_mf import park2_4_mf
  from ..test_data.park2_4.park2_4_mf import cost
  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.park1_3.park1_3_mf import cost
label_desc: Use image node_id 6 for calling the EuclideanFunctionCallerTestCase obj's underlying member method code with example usage: obj._test_for_func_vals(func_caller, unnorm_func_caller) and returns: fc_test_err,  ufc_test_err,  fc_ufc_err