<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_enum(self, property, enum, datas):
 """Factory enum type """

        str_property = str(datas[property]).lower()
        if str_property not in enum:
            raise ValueError("Unknow enum \"%s\" for \"%s\"." % (str_property, property))
        return enum(str_property)