I would remove `allowed_strategies` and write `if self.strategy not int ['mean', 'median', 'most_frequent']` instead.