<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_one_of(values):
 """ Validate that a field is in one of the given values. :param values: Iterable of valid values. :raises: ``ValidationError('one_of')`` """

    def one_of_validator(field, data):
        if field.value is None:
            return
        options = values
        if callable(options):
            options = options()
        if field.value not in options:
            raise ValidationError('one_of', choices=', '.join(map(str, options)))
    return one_of_validator