code: def test_scorer_default_average(data, score, average, expected_score):
      X_train, X_test, y_train, _ = data
  
      scorer = make_scorer(score, pos_label=1, average=average)
      grid = GridSearchCV(
          LogisticRegression(),
          param_grid={"C": [1, 10]},
          scoring=scorer,
          cv=3,
      )
      grid.fit(X_train, y_train).predict(X_test)
  
      assert grid.best_score_ >= expected_score
  
file_path: imbalanced-learn/imblearn/metrics/tests/test_score_objects.py
imports: import pytest
  from sklearn.datasets import make_blobs
  from sklearn.linear_model import LogisticRegression
  from sklearn.metrics import make_scorer
  from sklearn.model_selection import GridSearchCV, train_test_split
  from imblearn.metrics import geometric_mean_score, make_index_balanced_accuracy, sensitivity_score, specificity_score
label_desc: Use image node_id 3 for calling a global function with example usage: test_scorer_default_average(data, score, average, expected_score) without return types