code: def clf_transform_per_class(self, clust, covmats, n_clusters, labels):
      n_classes = len(np.unique(labels))
      n_matrices = covmats.shape[0]
      clf = clust(n_clusters=n_clusters)
      clf.fit(covmats, labels)
      transformed = clf.transform(covmats)
      assert transformed.shape == (n_matrices, n_classes * n_clusters)
  
imports: from conftest import get_metrics
  import numpy
  from numpy.testing import assert_array_equal
  import pytest
  from pyriemann.clustering import Kmeans, KmeansPerClassTransform, Potato, PotatoField
label_desc: Use image node_id 4 for calling the TestRiemannianClustering obj's underlying member method code with example usage: obj.clf_transform_per_class(clust, covmats, n_clusters, labels) without return types