code: def test_regression_custom_r2():
      X, y = make_regression(
          n_samples=1000,
          n_features=5,
          n_informative=2,
          n_targets=1,
          random_state=123,
          shuffle=False,
      )
  
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, test_size=0.3, random_state=123
      )
  
      svm = SVR(kernel="rbf", gamma="auto")
      svm.fit(X_train, y_train)
  
      imp_vals, imp_all = feature_importance_permutation(
          predict_method=svm.predict,
          X=X_test,
          y=y_test,
          metric=r2_score,
          num_rounds=1,
          seed=123,
      )
  
      assert imp_vals.shape == (X_train.shape[1],)
      assert imp_all.shape == (X_train.shape[1], 1)
      assert imp_vals[0] > 0.2
      assert imp_vals[1] > 0.2
      assert sum(imp_vals[3:]) <= 0.01
  
file_path: mlxtend/mlxtend/evaluate/tests/test_feature_importance.py
imports: import numpy
  import pandas
  from sklearn.datasets import make_classification, make_regression
  from sklearn.linear_model import LogisticRegression
  from sklearn.metrics import mean_squared_error, r2_score
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import OneHotEncoder
  from sklearn.svm import SVC, SVR
  from mlxtend.evaluate import feature_importance_permutation
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 6 for calling a global function with example usage: test_regression_custom_r2() without return types