code: def clf_fit_independence(classif, covmats, labels):
      clf = classif()
      clf.fit(covmats, labels).predict(covmats)
      # retraining with different size should erase previous fit
      new_covmats = covmats[:, :-1, :-1]
      clf.fit(new_covmats, labels).predict(new_covmats)
  
imports: import pickle
  import numpy
  from numpy.testing import assert_array_equal
  import pytest
  from pytest import approx
  from scipy.stats import mode
  from sklearn.dummy import DummyClassifier
  from conftest import get_distances, get_means, get_metrics
  from pyriemann.estimation import Covariances
  from pyriemann.utils.kernel import kernel
  from pyriemann.utils.mean import mean_covariance
  from pyriemann.classification import _mode_2d, MDM, FgMDM, KNearestNeighbor, TSclassifier, SVC, MeanField, class_distinctiveness
label_desc: Use image node_id 8 for calling a global function with example usage: clf_fit_independence(classif, covmats, labels) without return types