code: def test_score(nrows, ncols, nclusters, random_state):
      X, y = make_blobs(
          int(nrows),
          ncols,
          nclusters,
          cluster_std=1.0,
          shuffle=False,
          random_state=0,
      )
  
      cuml_kmeans = cuml.KMeans(
          init="k-means||",
          n_clusters=nclusters,
          random_state=random_state,
          output_type="numpy",
      )
  
      cuml_kmeans.fit(X)
  
      actual_score = cuml_kmeans.score(X)
      predictions = cuml_kmeans.predict(X)
  
      centers = cuml_kmeans.cluster_centers_
  
      expected_score = 0.0
      for idx, label in enumerate(predictions):
          x = X[idx, :]
          y = cp.array(centers[label, :], dtype=cp.float32)
  
          sq_euc_dist = cp.sum(cp.square((x - y)))
          expected_score += sq_euc_dist
  
      expected_score *= -1
  
      cp.testing.assert_allclose(
          actual_score, expected_score, atol=0.1, rtol=1e-4
      )
  
imports: from cuml.internals.safe_imports import gpu_only_import
  from sklearn.preprocessing import StandardScaler
  from sklearn.metrics import adjusted_rand_score
  from sklearn import cluster
  from cuml.testing.utils import get_pattern, unit_param, quality_param, stress_param, array_equal
  from cuml.datasets import make_blobs
  import pytest
  import random
  import cuml
  import cuml.internals.logger
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 10 for calling a global function with example usage: test_score(nrows, ncols, nclusters, random_state) without return types