code: def test_demographic_parity():
      _simple_compare(DemographicParity, selection_rate)
  
file_path: fairlearn/test/unit/reductions/moments/test_moments_control_features.py
imports: from test.unit.reductions.data_generators import loan_scenario_generator
  import pandas
  import pytest
  from sklearn.linear_model import LogisticRegression
  from sklearn.metrics import accuracy_score
  from fairlearn.metrics import MetricFrame, false_positive_rate, selection_rate, true_positive_rate
  from fairlearn.reductions import DemographicParity, EqualizedOdds, ErrorRateParity, FalsePositiveRateParity, TruePositiveRateParity
label_desc: Use image node_id 2 for calling a global function with example usage: test_demographic_parity() without return types