code: def init_pp(X, n_clusters, random_state):
      
      x_squared_norms = row_norms(X, squared=True).compute()
      logger.info("Initializing with k-means++")
      with _timer("initialization of %2d centers" % n_clusters, _logger=logger):
          centers = sk_k_means._k_init(
              X, n_clusters, random_state=random_state, x_squared_norms=x_squared_norms
          )
  
      return centers
docs: K-means initialization using k-means++
  
      This uses scikit-learn's implementation.