<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_entity(cls, entity: Entity) -> 'DictModel': """Convert the entity to a dictionary record """

        dict_obj = {}
        for field_name in entity.meta_.attributes:
            dict_obj[field_name] = getattr(entity, field_name)
        return dict_obj