<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_from_dict(self, attribute_dict):
 """ Method overriden from the base class """

        if 'template' in attribute_dict:
            self.update_from_dict(attribute_dict['template'])
            setattr(self,
                    self.Meta.id_field, attribute_dict['template']['name'])
            return
        try:
            for k, v in attribute_dict.items():
                setattr(self, k, v)
        except Exception:
            setattr(self, self.Meta.id_field, attribute_dict)