code: def test_svc_cref_callable(get_mats, get_targets, metric):
      n_matrices, n_channels = 6, 3
      covmats = get_mats(n_matrices, n_channels, "spd")
      targets = get_targets(n_matrices)
  
      def Cref(X):
          return mean_covariance(X, metric=metric)
  
      rsvc = SVR(Cref=Cref).fit(covmats, targets)
      rsvc_1 = SVR(metric=metric).fit(covmats, targets)
      assert np.array_equal(rsvc.Cref_, rsvc_1.Cref_)
  
      rsvc = SVR(Cref=Cref).fit(covmats, targets)
      rsvc.predict(covmats)
      rsvc_1 = SVR(metric=metric).fit(covmats, targets)
      rsvc_1.predict(covmats)
      assert np.array_equal(rsvc.Cref_, rsvc_1.Cref_)
  
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 10 for calling a global function with example usage: test_svc_cref_callable(get_mats, get_targets, metric) and returns: mean_covariance