def METHOD_NAME(cls, s: str):
    """
    Parse the enum from a string.
    :param s: string representation of the enum value
    :return: enum value
    """
    try:
        return cls[s.upper()]
    except KeyError:
        raise ValueError(
            f'{s.upper()} is not a valid enum for {cls!r}, must be one of {list(cls)}'
        )