class_docstr: Reweighing is a preprocessing technique that Weights the examples in each
  (group, label) combination differently to ensure fairness before
  classification [4]_.
  
  References:
      .. [4] F. Kamiran and T. Calders,  "Data Preprocessing Techniques for
         Classification without Discrimination," Knowledge and Information
         Systems, 2012.
docstr: Transform the dataset to a new dataset based on the estimated
  transformation.
  
  Args:
      dataset (BinaryLabelDataset): Dataset that needs to be transformed.
  Returns:
      dataset (BinaryLabelDataset): Dataset with transformed
          instance_weights attribute.
code: def transform(self, dataset):
      """Transform the dataset to a new dataset based on the estimated
      transformation.
  
      Args:
          dataset (BinaryLabelDataset): Dataset that needs to be transformed.
      Returns:
          dataset (BinaryLabelDataset): Dataset with transformed
              instance_weights attribute.
      """
  
      dataset_transformed = dataset.copy(deepcopy=True)
  
      (
          _,
          _,
          _,
          _,
          cond_p_fav,
          cond_p_unfav,
          cond_up_fav,
          cond_up_unfav,
      ) = self._obtain_conditionings(dataset)
  
      # apply reweighing
      dataset_transformed.instance_weights[cond_p_fav] *= self.w_p_fav
      dataset_transformed.instance_weights[
          cond_p_unfav
      ] *= self.w_p_unfav
      dataset_transformed.instance_weights[cond_up_fav] *= self.w_up_fav
      dataset_transformed.instance_weights[
          cond_up_unfav
      ] *= self.w_up_unfav
  
      return dataset_transformed
  
file_path: AIF360/aif360/algorithms/preprocessing/reweighing.py
imports: import numpy
  from aif360.algorithms import Transformer
  from aif360.metrics import utils
label_desc: Use image node_id 3 for calling the Reweighing obj's underlying member method code with example usage: obj.transform(dataset) and returns: dataset_transformed