code: def test_elkan_results_sparse(setup):
      for distribution in ["normal", "blobs"]:
          # check that results are identical between lloyd and elkan algorithms
          # with sparse input
          rnd = np.random.RandomState(0)
          if distribution == "normal":
              X = sp.random(
                  100, 100, density=0.1, format="csr", random_state=rnd
              )
              X.data = rnd.randn(len(X.data))
          else:
              X, _ = make_blobs(
                  n_samples=100, n_features=100, random_state=rnd
              )
              X = sp.csr_matrix(X)
  
          km_full = KMeans(
              algorithm="full",
              n_clusters=5,
              random_state=0,
              n_init=1,
              init="k-means++",
          )
          km_elkan = KMeans(
              algorithm="elkan",
              n_clusters=5,
              random_state=0,
              n_init=1,
              init="k-means++",
          )
  
          km_full.fit(X)
          km_elkan.fit(X)
          np.testing.assert_allclose(
              km_elkan.cluster_centers_, km_full.cluster_centers_
          )
          np.testing.assert_allclose(km_elkan.labels_, km_full.labels_)
  
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 5 for calling a global function with example usage: test_elkan_results_sparse(setup) without return types