class_docstr: Unit test class for the correctness or plausibility of Kmeans clustering
  results.
docstr: Test results for one cluster and for one cluster per point.
code: def test_extreme_cluster_numbers(self):
      """
      Test results for one cluster and for one cluster per point.
      """
      ## Check output for a single cluster.
      m = tc.kmeans.create(self.sf, num_clusters=1, verbose=False)
  
      self.assertEqual(m.cluster_info.num_rows(), 1)
      self.assertEqual(m.cluster_info["cluster_id"][0], 0)
      self.assertEqual(m.cluster_info["size"][0], self.n)
      self.assertTrue(all(m.cluster_id["cluster_id"] == 0))
  
      ## Check output if there is a cluster for each point.
      m = tc.kmeans.create(self.sf, num_clusters=self.n, verbose=False)
  
      self.assertItemsEqual(m.cluster_id["cluster_id"], range(self.n))
  
      self.assertTrue(all(m.cluster_id["distance"] < 1e-12))
      self.assertItemsEqual(m.cluster_info["cluster_id"], range(self.n))
      self.assertTrue(all(m.cluster_info["size"] == 1))
      self.assertTrue(
          all(m.cluster_info["sum_squared_distance"] < 1e-12)
      )
  
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 2 for calling the KmeansClusterTest obj's underlying member method code with example usage: obj.test_extreme_cluster_numbers() without return types