def predict(self, X):
if self.normalize:<EOL><INDENT>X = normalize(X)<EOL><DEDENT>check_is_fitted(self, "<STR_LIT>")<EOL>X = self._check_test_data(X)<EOL>return _labels_inertia(X, self.cluster_centers_)[<NUM_LIT:0>]<EOL>
Predict the closest cluster each sample in X belongs to.
        In the vector quantization literature, `cluster_centers_` is called
        the code book and each value returned by `predict` is the index of
        the closest code in the code book.

        Note:  Does not check that each point is on the sphere.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            New data to predict.

        Returns
        -------
        labels : array, shape [n_samples,]
            Index of the cluster each sample belongs to.