code: def test_average_predictive_value_difference():
      """Tests that the old and new average_predictive_value_difference matches exactly."""
      aod = average_predictive_value_difference(
          y, y_pred, prot_attr="sex", sample_weight=sample_weight
      )
      assert np.isclose(aod, cm.average_predictive_value_difference())
  
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 13 for calling a global function with example usage: test_average_predictive_value_difference() without return types