Imported from https://github.com/matthklein/equalized_odds_under_perturbation
