def Validate(self, value):
    """Validate options.

    Returns:
      Original value for provided alias.

    Raises:
      ValidationError when value is not one of predefined values.
    """
    if value is None:
      raise ValidationError('Value for options field must not be None.')
    value = str(value)
    if value not in self.options:
      raise ValidationError('Value \'%s\' not in %s.'
                            % (value, self.options))
    return self.options[value]
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/api/validation.py/Options.Validate/original