code: def _kmeans_distance(
      points: np.ndarray, centers: np.ndarray
  ) -> float:
      """Computes the distance between points and centers
      after affecting each points to the closest center.
      """
      assert points.shape[1] == centers.shape[1]
      distances = np.sum(
          (points[:, :, None] - centers.T[None, :, :]) ** 2, axis=1
      )
      affect = np.min(distances, axis=1)
      return float(np.sum(affect))
  
imports: import numpy
  import pandas
  import scipy.spatial
  from nevergrad.parametrization import parameter
  import nevergrad.common.typing
  from ..base import ExperimentFunction
  from .None import datasets
label_desc: Use image node_id 1 for calling a global function with example usage: _kmeans_distance(points, centers) and returns: float