docstr: Check the export_coreml() function.
code: def test_export_coreml(self):
      """
      Check the export_coreml() function.
      """
  
      def get_psnr(x, y):
          # See: https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
          # The higher the number the better.
          return 20 * np.log10(max(x.max(), y.max())) - 10 * np.log10(
              np.square(x - y).mean()
          )
  
      # Save the model as a CoreML model file
      filename = tempfile.mkstemp("ImageSimilarity.mlmodel")[1]
      self.model.export_coreml(filename)
  
      # Load the model back from the CoreML model file
      coreml_model = coremltools.models.MLModel(filename)
  
      # Get model distances for comparison
      img = self.sf[0:1][self.feature][0]
      img_fixed = tc.image_analysis.resize(
          img, *reversed(self.input_image_shape)
      )
      tc_ret = self.model.query(img_fixed, k=self.sf.num_rows())
  
      if _mac_ver() >= (10, 13):
          from PIL import Image as _PIL_Image
  
          pil_img = _PIL_Image.fromarray(img_fixed.pixel_data)
          coreml_ret = coreml_model.predict({"awesome_image": pil_img})
  
          # Compare distances
          coreml_distances = np.array(coreml_ret["distance"])
          tc_distances = tc_ret.sort("reference_label")[
              "distance"
          ].to_numpy()
          psnr_value = get_psnr(coreml_distances, tc_distances)
          self.assertTrue(psnr_value > 50)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import pytest
  import turicreate
  from turicreate.toolkits._internal_utils import _mac_ver
  import tempfile
  import shutil
  import coremltools
  import numpy
  from turicreate.toolkits._main import ToolkitError
label_desc: Use image node_id 13 for calling the ImageSimilarityTest obj's underlying member method code with example usage: obj.test_export_coreml() and returns: unknown