@classmethod
def convert_value(cls, value):
    """Converts values to a type-casted version.

        :param value: unicode
        :raises:      :exc:`exceptions.ValueError`

        Performs conversion as per the :term:`VRI` specification. If a
        recognized type qualifier is included but the string is
        invalid for the conversion, an exception is raised.

        If *value* has a leading keyword which is not recognized,
        *value* is returned as-is.

        """
    if not ':' in value:
        return value
    keyword, value = value.split(':', 1)
    if keyword == 'str':
        return value
    elif keyword == 'int':
        return int(value)
    elif keyword == 'bool':
        if value == 'True':
            return True
        elif value == 'False':
            return False
        else:
            raise ValueError()
    else:
        return value
