docs: def _labels_inertia(X, centers):
      """Compute labels and inertia with cosine distance.
      """
      n_examples, n_features = X.shape
      n_clusters, n_features = centers.shape
  
      labels = np.zeros((n_examples,))
      inertia = np.zeros((n_examples,))
  
      for ee in range(n_examples):
          dists = np.zeros((n_clusters,))
          for cc in range(n_clusters):
              dists[cc] = 1 - X[ee, :].dot(centers[cc, :].T)
  
          labels[ee] = np.argmin(dists)
          inertia[ee] = dists[int(labels[ee])]
  
      return labels, np.sum(inertia)