@classmethod<EOL><INDENT>def get_class_for_value(cls, value):<DEDENT>
type_ = value.__class__<EOL>if issubclass(type_, ChoiceAttributeMixin):<EOL><INDENT>return type_<EOL><DEDENT>if type_ not in cls._classes_by_type:<EOL><INDENT>class_name = str('<STR_LIT>' % type_.__name__.capitalize())<EOL>cls._classes_by_type[type_] = type(class_name, (cls, type_), {<EOL>'<STR_LIT>': cls,<EOL>})<EOL><DEDENT>return cls._classes_by_type[type_]<EOL>
Class method to construct a class based on this mixin and the type of the given value.

        Parameters
        ----------
        value: ?
            The value from which to extract the type to create the new class.

        Notes
        -----
        The  create classes are cached (in ``cls.__classes_by_type``) to avoid recreating already
        created classes.