code: def test_calib_eq_odds_prefit(new_adult):
      """Test the 'prefit' option in PostProcessingMeta."""
      X, y, sample_weight = new_adult
  
      logreg = LogisticRegression(solver="lbfgs", max_iter=500)
      cal_eq_odds = CalibratedEqualizedOdds("sex")
      pp = PostProcessingMeta(logreg, cal_eq_odds, prefit=True)
      with pytest.raises(sklearn.exceptions.NotFittedError):
          pp.fit(X, y, sample_weight=sample_weight)
  
      pp = PostProcessingMeta(logreg, cal_eq_odds, random_state=1234)
      pp.fit(X, y, sample_weight=sample_weight)
  
      _, X_pp, _, y_pp, _, sw_pp = train_test_split(
          X, y, sample_weight, random_state=1234
      )
      pp_prefit = PostProcessingMeta(
          pp.estimator_, cal_eq_odds, prefit=True
      )
      pp_prefit.fit(X_pp, y_pp, sample_weight=sw_pp)
  
      assert np.allclose(
          pp.postprocessor_.mix_rates_,
          pp_prefit.postprocessor_.mix_rates_,
      )
  
file_path: AIF360/tests/sklearn/test_calibrated_equalized_odds.py
imports: import numpy
  import pytest
  import sklearn
  from sklearn.linear_model import LogisticRegression
  from sklearn.model_selection import train_test_split
  from aif360.algorithms.postprocessing import CalibratedEqOddsPostprocessing
  from aif360.sklearn.postprocessing import CalibratedEqualizedOdds, PostProcessingMeta
label_desc: Use image node_id 3 for calling a global function with example usage: test_calib_eq_odds_prefit(new_adult) without return types