code: def _test_model(
      self,
      input_dict,
      ref_output_dict,
      coreml_model,
      snr_thresh=15,
      psnr_thresh=30,
      cpu_only=False,
  ):
      coreml_out_dict = coreml_model.predict(
          input_dict, useCPUOnly=cpu_only
      )
      for out_ in list(ref_output_dict.keys()):
          ref_out = ref_output_dict[out_].flatten()
          coreml_out = coreml_out_dict[out_].flatten()
          self.assertEquals(len(coreml_out), len(ref_out))
          self._compare_predictions_numerical(
              ref_out,
              coreml_out,
              snr_thresh=snr_thresh,
              psnr_thresh=psnr_thresh,
          )
  
imports: from __future__ import print_function
  import unittest
  import numpy
  import coremltools.models.datatypes
  from coremltools.models import neural_network
  from coremltools.models import MLModel
  from coremltools.models.utils import _is_macos, _macos_version
  from coremltools._deps import _HAS_TF, MSG_TF1_NOT_FOUND
  import itertools
label_desc: Use image node_id 3 for calling the CorrectnessTest obj's underlying member method code with example usage: obj._test_model(input_dict, ref_output_dict, coreml_model, snr_thresh, psnr_thresh, cpu_only) without return types