def update(self, id, data):
        id = self._validate_id_format(id)

        new_data = self._sanitize_for_update(data)

        try:
            obj = self.objects[id]
        except KeyError:
            raise exceptions.IdNotFound(message='id %d does not exist' % id)

        obj = self.objects.new(id=id, **(self._sanitize_for_update(new_data)))
        obj.save()

        return obj.to_hash()
dataset/ETHPy150Open rcbops/opencenter/opencenter/db/abstraction.py/APIAbstraction.update/original