code: def clf_fit_independence(self, clust, covmats, n=None):
      if n is None:
          clf = clust()
      else:  # PotatoField
          clf = clust(n_potatoes=n)
      clf.fit(covmats).transform(covmats)
      # retraining with different size should erase previous fit
      if n is None:
          new_covmats = covmats[:, :-1, :-1]
      else:
          new_covmats = [c[:, :-1, :-1] for c in covmats]
      clf.fit(new_covmats).transform(new_covmats)
  
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 8 for calling the TestRiemannianClustering obj's underlying member method code with example usage: obj.clf_fit_independence(clust, covmats, n) without return types