code: def clf_transform(self, clust, covmats, n_clusters=None):
      n_matrices = len(covmats)
      if n_clusters is None:
          clf = clust()
      elif clust is PotatoField:
          n_matrices = len(covmats[0])
          clf = clust(n_potatoes=n_clusters)
      else:
          clf = clust(n_clusters=n_clusters)
      clf.fit(covmats)
      transformed = clf.transform(covmats)
      if n_clusters is None:
          assert transformed.shape == (n_matrices,)
      else:
          assert transformed.shape == (n_matrices, 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 1 for calling the TestRiemannianClustering obj's underlying member method code with example usage: obj.clf_transform(clust, covmats, n_clusters) without return types