@classmethod
def from_str(cls, strvalue):
    """Parses a string value (`strvalue`) to ``Level``."""
    strvalue = strvalue.lower()
    if strvalue == 'toy':
        return cls.TOY
    elif strvalue == 'medium':
        return cls.MEDIUM
    elif strvalue == 'realworld':
        return cls.REALWORLD
    else:
        raise ValueError("Unrecognized level value '{}' provided.".format(
            strvalue))
