def object_update(self, author, recipient, object_type, obj, session):
        # Verify message
        obj_class = globals()[object_type]
        missing_keys = obj_class.validate_changeset(obj, update=True)
        if len(missing_keys) > 0:
            raise KeyError("Missing '{}' for updating {} from changeset".format(obj_class.__name__))

        obj_modified = dateutil_parse(obj["modified"])

        # Retrieve local object copy
        o = obj_class.query.get(obj["id"])

        if o is None:
            self.logger.warning("Received update for unknown <{} [{}]>".format(object_type, obj["id"][:6]))

            o = obj_class(id=obj["id"])
            o.set_state(-1)
            session.add(o)

            self.request_object(
                object_type=object_type,
                object_id=obj["id"],
                author=recipient,
                recipient=author,
                session=session)
        else:
            if o.authorize("update", author.id):
                if obj_modified <= o.modified or (hasattr(o, "_stub") and o._stub is True):
                    o.update_from_changeset(obj, update_sender=author, update_recipient=recipient)
                    if isinstance(o, Persona):
                        o.stub = False
                    # else:
                    #     o.set_state(0)
                    session.add(o)
                    self.logger.info("Applied update for {}".format(o))
                else:
                    self.logger.info("Received obsolete update ({})".format(obj))
            else:
                self.logger.warning("{} is not authorized to update {} - update canceled.".format(author, o))

        return o
dataset/ETHPy150Open ciex/souma/synapse/__init__.py/Synapse.object_update/swapped operands of `<=`