def validate(self, obj, value):
        if value is None:
            if self._allow_none:
                return value

        if value in self.values:
                return value
        self.error(obj, value)
dataset/ETHPy150Open enthought/depsolver/depsolver/bundled/traitlets/_implementation.py/Enum.validate/original