code: def test_sqlite_store_partition_update(
      root_verify_key,
      sqlite_store_partition: SQLiteStorePartition,
  ) -> None:
      # add item
      obj = MockSyftObject(data=1)
      sqlite_store_partition.set(
          root_verify_key, obj, ignore_duplicates=False
      )
      assert (
          len(
              sqlite_store_partition.all(
                  root_verify_key,
              ).ok()
          )
          == 1
      )
  
      # fail to update missing keys
      rand_obj = MockSyftObject(data="bogus")
      key = sqlite_store_partition.settings.store_key.with_obj(rand_obj)
      res = sqlite_store_partition.update(root_verify_key, key, obj)
      assert res.is_err()
  
      # update the key multiple times
      for v in range(REPEATS):
          key = sqlite_store_partition.settings.store_key.with_obj(obj)
          obj_new = MockSyftObject(data=v)
  
          res = sqlite_store_partition.update(
              root_verify_key, key, obj_new
          )
          assert res.is_ok()
  
          # The ID should stay the same on update, unly the values are updated.
          assert (
              len(
                  sqlite_store_partition.all(
                      root_verify_key,
                  ).ok()
              )
              == 1
          )
          assert (
              sqlite_store_partition.all(
                  root_verify_key,
              )
              .ok()[0]
              .id
              == obj.id
          )
          assert (
              sqlite_store_partition.all(
                  root_verify_key,
              )
              .ok()[0]
              .id
              != obj_new.id
          )
          assert (
              sqlite_store_partition.all(
                  root_verify_key,
              )
              .ok()[0]
              .data
              == v
          )
  
          stored = sqlite_store_partition.get_all_from_store(
              root_verify_key, QueryKeys(qks=[key])
          )
          assert stored.ok()[0].data == v
  
file_path: PySyft/packages/syft/tests/syft/stores/sqlite_document_store_test.py
imports: from threading import Thread
  from typing import Tuple
  from joblib import Parallel
  from joblib import delayed
  import pytest
  from syft.store.document_store import QueryKeys
  from syft.store.sqlite_document_store import SQLiteStorePartition
  from .store_fixtures_test import sqlite_store_partition_fn
  from .store_mocks_test import MockObjectType
  from .store_mocks_test import MockSyftObject
label_desc: Use image node_id 4 for calling a global function with example usage: test_sqlite_store_partition_update(root_verify_key, sqlite_store_partition) without return types