code: def reg_fit_independence(self, regres, covmats, targets):
      clf = regres()
      clf.fit(covmats, targets).predict(covmats)
      # retraining with different size should erase previous fit
      new_covmats = covmats[:, :-1, :-1]
      clf.fit(new_covmats, targets).predict(new_covmats)
  
imports: import pickle
  import numpy
  from numpy.testing import assert_array_equal
  import pytest
  from conftest import get_distances, get_means, get_metrics
  from pyriemann.regression import SVR, KNearestNeighborRegressor
  from pyriemann.utils.kernel import kernel
  from pyriemann.utils.mean import mean_covariance
label_desc: Use image node_id 2 for calling the TestRegressor obj's underlying member method code with example usage: obj.reg_fit_independence(regres, covmats, targets) without return types