class_docstr: Generic Key-Value Action store.
  
  Parameters:
      store_config: StoreConfig
          Backend specific configuration, including connection configuration, database name, or client class type.
      root_verify_key: Optional[SyftVerifyKey]
          Signature verification key, used for checking access permissions.
class_docstr_tok: ["Generic","Key-Value","Action","store",".","Parameters",":","store_config",":","StoreConfig","Backend","specific","configuration",",","including","connection","configuration",",","database","name",",","or","client","class","type",".","root_verify_key",":","Optional","[","SyftVerifyKey","]","Signature","verification","key",",","used","for","checking","access","permissions","."]
code: def set(
      self,
      uid: UID,
      credentials: SyftVerifyKey,
      syft_object: SyftObject,
      has_result_read_permission: bool = False,
  ) -> Result[SyftSuccess, Err]:
      uid = uid.id  # We only need the UID from LineageID or UID
  
      # if you set something you need WRITE permission
      write_permission = ActionObjectWRITE(
          uid=uid, credentials=credentials
      )
      can_write = self.has_permission(write_permission)
  
      if not self.exists(uid=uid):
          # attempt to claim it for writing
          if has_result_read_permission:
              ownership_result = self.take_ownership(
                  uid=uid, credentials=credentials
              )
              can_write = True if ownership_result.is_ok() else False
          else:
              # root takes owneship, but you can still write
              ownership_result = self.take_ownership(
                  uid=uid, credentials=self.root_verify_key
              )
              can_write = True if ownership_result.is_ok() else False
  
      if can_write:
          self.data[uid] = syft_object
          if has_result_read_permission:
              if uid not in self.permissions:
                  # create default permissions
                  self.permissions[uid] = set()
              self.add_permission(
                  ActionObjectREAD(uid=uid, credentials=credentials)
              )
          else:
              self.add_permissions(
                  [
                      ActionObjectWRITE(
                          uid=uid, credentials=credentials
                      ),
                      ActionObjectEXECUTE(
                          uid=uid, credentials=credentials
                      ),
                  ]
              )
  
          return Ok(SyftSuccess(message=f"Set for ID: {uid}"))
      return Err(f"Permission: {write_permission} denied")
  
imports: from __future__ import annotations
  import threading
  from typing import List
  from typing import Optional
  from result import Err
  from result import Ok
  from result import Result
  from ...node.credentials import SyftSigningKey
  from ...node.credentials import SyftVerifyKey
  from ...serde.serializable import serializable
  from ...store.dict_document_store import DictStoreConfig
  from ...store.document_store import BasePartitionSettings
  from ...store.document_store import StoreConfig
  from ...types.syft_object import SyftObject
  from ...types.twin_object import TwinObject
  from ...types.uid import LineageID
  from ...types.uid import UID
  from ..response import SyftSuccess
  from .action_object import is_action_data_empty
  from .action_permissions import ActionObjectEXECUTE
  from .action_permissions import ActionObjectOWNER
  from .action_permissions import ActionObjectPermission
  from .action_permissions import ActionObjectREAD
  from .action_permissions import ActionObjectWRITE
  from .action_permissions import ActionPermission
label_desc: Use image node_id 6 for calling the KeyValueActionStore obj's underlying member method code with example usage: obj.set(uid, credentials, syft_object, has_result_read_permission) and returns: Err, Ok