<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_dict(document):
 """Create data type definition form Json-like object represenation. Parameters document : dict Json-like object represenation Returns ------- AttributeType """

        # Get the type name from the document
        type_name = document['name']
        if type_name == ATTR_TYPE_INT:
            return IntType()
        elif type_name == ATTR_TYPE_FLOAT:
            return FloatType()
        elif type_name == ATTR_TYPE_ENUM:
            return EnumType(document['values'])
        elif type_name == ATTR_TYPE_DICT:
            return DictType()
        elif type_name == ATTR_TYPE_LIST:
            return ListType()
        else:
            raise ValueError('invalid attribute type: ' + str(type_name))