code: def test_mitigation_roc(self):
      exp = copy(self.exp)
      exp.y_hat = np.array([0.3, 0.4, 0.45, 0.55, 0.6, 0.7])
      exp.y = np.array([0, 0, 0, 1, 1, 1])
      protected = ["A", "A", "A", "B", "B", "B"]
      privileged = "B"
  
      exp2 = roc_pivot(
          exp, protected, privileged, cutoff=0.5, theta=0.09
      )
      self.assertEqual(
          list(np.round(exp2.y_hat, 2)),
          [0.3, 0.4, 0.55, 0.45, 0.6, 0.7],
      )
  
      exp.y_hat = np.array([0.3, 0.4, 0.45, 0.55, 0.6, 0.7])
      exp.y = np.array([0, 0, 0, 1, 1, 1])
      protected = ["A", "A", "A", "B", "B", "B"]
      privileged = "B"
  
      exp2 = roc_pivot(
          exp, protected, privileged, cutoff=0.5, theta=0.11
      )
      self.assertEqual(
          list(np.round(exp2.y_hat, 2)),
          [0.3, 0.6, 0.55, 0.45, 0.4, 0.7],
      )
  
      with self.assertRaises(
          dx.fairness._basics.exceptions.ParameterCheckError
      ):
          roc_pivot("not explainer", protected, privileged)
  
      with self.assertRaises(
          dx.fairness._basics.exceptions.ParameterCheckError
      ):
          roc_pivot(exp, protected, privileged, cutoff=0.5, theta=1.4)
  
      with self.assertRaises(
          dx.fairness._basics.exceptions.ParameterCheckError
      ):
          roc_pivot(
              exp, protected, privileged, cutoff=0.5, theta="sth_else"
          )
  
imports: import unittest
  from copy import deepcopy
  import numpy
  import pandas
  from copy import copy
  from plotly.graph_objs import Figure
  from sklearn.compose import ColumnTransformer
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import OneHotEncoder
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.tree import DecisionTreeRegressor
  import dalex
  from dalex.fairness import reweight, resample, roc_pivot
label_desc: Use image node_id 23 for calling the FairnessTest obj's underlying member method code with example usage: obj.test_mitigation_roc() without return types