def METHOD_NAME(enum_class, name):
    enum_name = name.upper().replace(" ", "_").replace("'", "").replace("é", "e").replace("-", "_")
    if enum_name not in enum_class.__members__:
        raise Exception("Unknown enum name " + enum_name + " (orig: " + name + ")")
    return enum_class[enum_name]