def object_from_dict(res_type, obj_dict): obj_cls = get_object_class(res_type) return obj_cls.from_dict(**copy.deepcopy(obj_dict))