Move this function to `EntropyMinimizationDiscretizer` as well.