class_docstr: Unit test class for an already trained Kmeans model.
docstr: Make sure the parameters for `predict` work correctly. Don't worry
  about accuracy of the results - see the KmeansResultsTest class for
  that.
code: def test_predict_params(self):
      """
      Make sure the parameters for `predict` work correctly. Don't worry
      about accuracy of the results - see the KmeansResultsTest class for
      that.
      """
  
      ## Check that bad input data is trapped correctly.
      with self.assertRaises(ToolkitError):
          ans = self.model.predict(tc.SFrame(), verbose=False)
  
      with self.assertRaises(ToolkitError):
          ans = self.model.predict(self.sf["int0"], verbose=False)
  
      ## Check that mis-matching schemas are trapped correctly. All features
      #  are used when the model is created.
      with self.assertRaises(ToolkitError):
          ans = self.model.predict(self.sf[["int0"]], verbose=False)
  
      ## Check that bad inputs for the output type are trapped correctly.
      with self.assertRaises(TypeError):
          ans = self.model.predict(
              self.sf, output_type=1, verbose=False
          )
  
      ## Check that output type correctly changes the type of the outputs.
      ans = self.model.predict(
          self.sf, output_type="cluster_id", verbose=False
      )
      self.assertIsInstance(ans, tc.SArray)
      self.assertTrue(ans.dtype == int)
  
      ans = self.model.predict(
          self.sf, output_type="distance", verbose=False
      )
      self.assertIsInstance(ans, tc.SArray)
      self.assertTrue(ans.dtype == float)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import copy
  import numpy
  from numpy.testing import assert_allclose
  import turicreate
  from .None import util
  from turicreate.util import _assert_sframe_equal
  from turicreate.toolkits._main import ToolkitError
  import sys
label_desc: Use image node_id 6 for calling the KmeansModelTest obj's underlying member method code with example usage: obj.test_predict_params() without return types