class_docstr: Clustering by k-means for each class with SPD matrices as inputs.
  
  See Also
  --------
  Kmeans
docstr: Transform.
docstr_tok: ["Transform","."]
code: def transform(self, X):
      """Transform."""
      mdm = MDM(metric=self.metric, n_jobs=self.km.n_jobs)
      mdm.metric_mean, mdm.metric_dist = _check_metric(self.metric)
      mdm.covmeans_ = self.covmeans_
      return mdm._predict_distances(X)
  
imports: import numpy
  from joblib import Parallel, delayed
  from scipy.stats import norm, chi2
  import sklearn
  from sklearn.base import BaseEstimator, ClassifierMixin, TransformerMixin, ClusterMixin, clone
  from sklearn.cluster import KMeans
  from .classification import MDM, _check_metric
  from .utils.mean import mean_covariance
  from .utils.geodesic import geodesic
label_desc: Use image node_id 3 for calling the KmeansPerClassTransform obj's underlying member method code with example usage: obj.transform(X) and returns: mdm