def custom_message_validator(validator, error_message=None):
    def _validator(raw_value):
        try:
            return validator(raw_value)
        except __HOLE__ as e:
            if error_message:
                e.args = (error_message,)
            raise
    return _validator
dataset/ETHPy150Open sodastsai/taskr/taskr/contrib/validators.py/custom_message_validator