def ChoiceEnum(choices: List[str]):
    """return the Enum class used to enforce list of choices"""
    return StrEnum("Choices", {k: k for k in choices})
return the Enum class used to enforce list of choices
fairseq/dataclass/constants.py