@classmethod<EOL><INDENT>def from_json(cls, data):<DEDENT>
assert '<STR_LIT:name>' in data, '<STR_LIT>'<EOL>assert '<STR_LIT>' in data, '<STR_LIT>'<EOL>if cls._type_enumeration is None:<EOL><INDENT>cls._type_enumeration = _DataTypeEnumeration(import_modules=False)<EOL><DEDENT>if data['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>assert '<STR_LIT>' in data,'<STR_LIT>'<EOL>return cls._type_enumeration._GENERICTYPE(data['<STR_LIT:name>'], data['<STR_LIT>'])<EOL><DEDENT>elif data['<STR_LIT>'] in cls._type_enumeration._TYPES:<EOL><INDENT>clss = cls._type_enumeration._TYPES[data['<STR_LIT>']]<EOL>if data['<STR_LIT>'] == data['<STR_LIT:name>'].title().replace('<STR_LIT:U+0020>', '<STR_LIT>'):<EOL><INDENT>return clss()<EOL><DEDENT>else:<EOL><INDENT>instance = clss()<EOL>instance._name = data['<STR_LIT:name>']<EOL>return instance<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'.format(data['<STR_LIT>']))<EOL><DEDENT>
Create a data type from a dictionary.

        Args:
            data: Data as a dictionary.
                {
                    "name": data type name of the data type as a string
                    "data_type": the class name of the data type as a string
                    "base_unit": the base unit of the data type
                }