def METHOD_NAME(self, X, y):
    fairness_info = {
        "favorable_labels": self.favorable_labels,
        "protected_attributes": self.protected_attributes,
        "unfavorable_labels": self.unfavorable_labels,
    }
    prot_attr_enc = ProtectedAttributesEncoder(
        **fairness_info,
        remainder="drop",
    )
    encoded_X, encoded_y = prot_attr_enc.transform_X_y(X, y)
    prot_attr_names = [pa["feature"] for pa in self.protected_attributes]
    pandas_to_dataset = _PandasToDatasetConverter(
        favorable_label=1,
        unfavorable_label=0,
        protected_attribute_names=prot_attr_names,
    )
    encoded_data = pandas_to_dataset.convert(encoded_X, encoded_y)
    unprivileged_groups = [{name: 0 for name in prot_attr_names}]
    privileged_groups = [{name: 1 for name in prot_attr_names}]
    reweighing_trainable = aif360.algorithms.preprocessing.Reweighing(
        unprivileged_groups=unprivileged_groups,
        privileged_groups=privileged_groups,
    )
    reweighing_trained = reweighing_trainable.METHOD_NAME(encoded_data)
    reweighted_data = reweighing_trained.transform(encoded_data)
    sample_weight = reweighted_data.instance_weights
    if self.redact:
        redacting_trainable = Redacting(**fairness_info)
        self.redacting = redacting_trainable.METHOD_NAME(X)
    else:
        self.redacting = lale.lib.lale.NoOp
    redacted_X = self.redacting.transform(X)
    if isinstance(self.estimator, lale.operators.TrainablePipeline):
        trainable_prefix = self.estimator.remove_last()
        trainable_suffix = self.estimator.get_last()
        assert trainable_suffix is not None
        trained_prefix = trainable_prefix.METHOD_NAME(X, y)
        transformed_X = trained_prefix.transform(redacted_X)
        trained_suffix = trainable_suffix.METHOD_NAME(
            transformed_X, y, sample_weight=sample_weight
        )
        self.estimator = trained_prefix >> trained_suffix
    else:
        self.estimator = self.estimator.METHOD_NAME(
            redacted_X, y, sample_weight=sample_weight
        )
    return self