code: def test_make_scorer(func, is_ratio):
      actual = func(y, y_pred, prot_attr="sex", priv_group=1)
      actual_fliped = func(y, y_pred, prot_attr="sex", priv_group=0)
      scorer = make_scorer(
          func, is_ratio=is_ratio, prot_attr="sex", priv_group=1
      )
      expected = scorer(lr, X, y)
      if is_ratio:
          ret = min(actual, actual_fliped)
          assert_almost_equal(ret, expected, 3)
      else:
          # The lower the better
          assert_almost_equal(-abs(actual), expected, 3)
          assert_almost_equal(-abs(actual_fliped), expected, 3)
  
imports: from functools import partial
  import numpy
  import pandas
  import pytest
  from numpy.testing import assert_almost_equal
  from sklearn.linear_model import LogisticRegression
  from aif360.datasets import AdultDataset
  from aif360.sklearn.datasets import fetch_adult
  from aif360.metrics import ClassificationMetric
  from aif360.sklearn.metrics import consistency_score, specificity_score, selection_rate, base_rate, smoothed_base_rate, generalized_fpr, generalized_fnr, disparate_impact_ratio, statistical_parity_difference, equal_opportunity_difference, average_odds_difference, average_predictive_value_difference, average_odds_error, smoothed_edf, df_bias_amplification, generalized_entropy_error, between_group_generalized_entropy_error, class_imbalance, kl_divergence, conditional_demographic_disparity, intersection, one_vs_rest, make_scorer
label_desc: Use image node_id 22 for calling a global function with example usage: test_make_scorer(func, is_ratio) without return types