def METHOD_NAME(self, y_true, y_pred, mask_privileged_group):
    mask_bp = mask_privileged_group & (y_true > 0.5)
    mask_sn = ~mask_privileged_group & (y_true < 0.5)
    mask = mask_bp | mask_sn
    return self._compute_base_metric(y_true[mask], y_pred[mask])