code: def test_export_coreml_with_non_maximum_suppression(self):
      from PIL import Image
      import coremltools
  
      filename = tempfile.NamedTemporaryFile(suffix=".mlmodel").name
      self.model.export_coreml(
          filename, include_non_maximum_suppression=True
      )
  
      coreml_model = coremltools.models.MLModel(filename)
      img = self.sf[0:1][self.feature][0]
      img_fixed = tc.image_analysis.resize(img, 416, 416, 3)
      pil_img = Image.fromarray(img_fixed.pixel_data)
      if _mac_ver() >= (10, 13):
          ret = coreml_model.predict(
              {self.feature: pil_img}, usesCPUOnly=True
          )
          self.assertEqual(ret["coordinates"].shape[1], 4)
          self.assertEqual(ret["confidence"].shape[1], len(_CLASSES))
          self.assertEqual(
              ret["coordinates"].shape[0], ret["confidence"].shape[0]
          )
          # A numeric comparison of the resulting of top bounding boxes is
          # not that meaningful unless the model has converged
  
      # Also check if we can train a second model and export it.
      filename2 = tempfile.NamedTemporaryFile(suffix=".mlmodel").name
      # We also test at the same time if we can export a model with a single
      # class
      sf = tc.SFrame(
          {
              "image": [self.sf[self.feature][0]],
              "ann": [self.sf[self.annotations][0][:1]],
          }
      )
      model2 = tc.object_detector.create(sf, max_iterations=1)
      model2.export_coreml(
          filename2, include_non_maximum_suppression=True
      )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import pytest
  from .None import util
  import turicreate
  import tempfile
  import numpy
  import platform
  import pytest
  import sys
  import os
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._internal_utils import _raise_error_if_not_sarray, _mac_ver
  from six import StringIO
label_desc: Use image node_id 30 for calling the ObjectDetectorTest obj's underlying member method code with example usage: obj.test_export_coreml_with_non_maximum_suppression() without return types