class_docstr: Test creation of the Kmeans model with various parameter and dataset
  configurations.
docstr: Test error trapping and handling for inappropriate input datasets, both
  the main dataset, and initial centers.
code: def test_bad_data(self):
      """
      Test error trapping and handling for inappropriate input datasets, both
      the main dataset, and initial centers.
      """
      ## Empty SFrame
      with self.assertRaises(ValueError):
          m = tc.kmeans.create(
              dataset=tc.SFrame(),
              num_clusters=self.K,
              max_iterations=self.max_iter,
              verbose=False,
          )
  
      ## Dataset as an SArray
      with self.assertRaises(TypeError):
          m = tc.kmeans.create(
              dataset=self.sf["int0"],
              num_clusters=self.K,
              max_iterations=self.max_iter,
              verbose=False,
          )
  
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 3 for calling the KmeansCreateTest obj's underlying member method code with example usage: obj.test_bad_data() without return types