code: def test_initialization_raises():
      d = 2
  
      assert_raises(ValueError, KMeans)
      assert_raises(ValueError, KMeans, k=1)
      assert_raises(ValueError, KMeans, k=0)
      assert_raises(ValueError, KMeans, k=-1)
      assert_raises(ValueError, KMeans, k=2.4)
  
      assert_raises(ValueError, KMeans, d, inertia=-0.4)
      assert_raises(ValueError, KMeans, d, inertia=1.2)
      assert_raises(ValueError, KMeans, d, inertia=1.2, frozen="true")
      assert_raises(ValueError, KMeans, d, inertia=1.2, frozen=3)
  
      assert_raises(ValueError, KMeans, d, tol=-2)
  
      assert_raises(ValueError, KMeans, d, max_iter=0)
      assert_raises(ValueError, KMeans, d, max_iter=1.3)
      assert_raises(ValueError, KMeans, d, max_iter=-2)
  
      assert_raises(ValueError, KMeans, d, init="aaa")
      assert_raises(ValueError, KMeans, d, init=False)
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.kmeans import KMeans
  from .distributions._utils import _test_initialization_raises_one_parameter
  from .distributions._utils import _test_initialization
  from .distributions._utils import _test_predictions
  from .distributions._utils import _test_efd_from_summaries
  from .distributions._utils import _test_raises
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 6 for calling a global function with example usage: test_initialization_raises() without return types