def update(self, allow_partial=True, force=False, **kwargs):
if kwargs:<EOL><INDENT>self.__init__(partial=allow_partial, force=force, **kwargs)<EOL>return not self._partial<EOL><DEDENT>if not force and CACHE.get(hash(self)):<EOL><INDENT>cached = CACHE[hash(self)]<EOL>for field in self._SIMPLE_FIELDS | self._COMPLEX_FIELDS:<EOL><INDENT>v = getattr(cached, field)<EOL>setattr(self, field, v)<EOL><DEDENT>self._partial = False<EOL>logging.info(f'<STR_LIT>')<EOL>return True<EOL><DEDENT>resp_dict = element_lookup_by_id(self.type, self.id)<EOL>self.__init__(partial=False, **resp_dict)<EOL>return True<EOL>
Updates record and returns True if record is complete after update, else False.