code: def test_k_means_n_init(setup):
      rnd = np.random.RandomState(0)
      X = rnd.normal(size=(40, 2))
  
      # two regression tests on bad n_init argument
      # previous bug: n_init <= 0 threw non-informative TypeError (#3858)
      with pytest.raises(ValueError, match="n_init"):
          KMeans(n_init=0, init="k-means++").fit(X)
      with pytest.raises(ValueError, match="n_init"):
          KMeans(n_init=-1, init="k-means++").fit(X)
  
imports: import sys
  from io import StringIO
  import numpy
  import pytest
  import scipy.sparse
  from ....None import tensor
  from ....core import TileableGraphBuilder, TileableGraph, ChunkGraphBuilder
  from ....config import options
  from ..None import KMeans, k_means
  from .._kmeans import _init_centroids
label_desc: Use image node_id 9 for calling a global function with example usage: test_k_means_n_init(setup) without return types