@classmethod
    def convert(cls, value):
        if isinstance(value, cls):
            return value
        try:
            return cls(value.upper())
        except (__HOLE__, AttributeError):
            valids = [cls.VERY_HIGH, cls.HIGH, cls.NORMAL,
                      cls.LOW, cls.VERY_LOW]
            valids = [p.value for p in valids]
            raise ValueError("'%s' is not a valid priority, valid"
                             " priorities are %s" % (value, valids))
dataset/ETHPy150Open openstack/taskflow/taskflow/jobs/base.py/JobPriority.convert