There is the same function in preprocessing/imputation.py. We should avoid code dupplications.