code: def testkmeans1(self):
      X = nr.randn(10, 2)
      A = np.concatenate([np.ones((7, 2)), np.zeros((3, 2))])
      X = X + 3 * A
      L = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1])
      C, L, J = kmeans(X, 2, L)
      self.assertLess(np.mean(L[:7]), 0.5)
  
file_path: nipy/nipy/algorithms/clustering/tests/test_clustering.py
imports: from unittest import TestCase
  import numpy
  import numpy.random
  from ..utils import kmeans
label_desc: Use image node_id 1 for calling the TestClustering obj's underlying member method code with example usage: obj.testkmeans1() without return types