class_docstr: Unit test class for an already trained model.
class_docstr_tok: ["Unit","test","class","for","an","already","trained","model","."]
code: def test_export_coreml_with_predict(self):
      filename = tempfile.NamedTemporaryFile(suffix=".mlmodel").name
      self.model.export_coreml(filename)
      preds = self.model.predict(
          self.docs, output_type="probability_vector"
      )
  
      import coremltools
  
      coreml_model = coremltools.models.MLModel(filename)
      coreml_preds = coreml_model.predict(
          {"text": {"hello": 1, "friend": 1}}
      )
      self.assertAlmostEqual(
          preds[0][0], coreml_preds["scoreProbability"][0]
      )
      self.assertAlmostEqual(
          preds[0][1], coreml_preds["scoreProbability"][1]
      )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import tempfile
  import turicreate
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._internal_utils import _mac_ver
  from .None import util
  import sys
label_desc: Use image node_id 8 for calling the TextClassifierTest obj's underlying member method code with example usage: obj.test_export_coreml_with_predict() without return types