code: def test_mongo_store_partition_has_permission(
      root_verify_key: SyftVerifyKey,
      guest_verify_key: SyftVerifyKey,
      mongo_store_partition: MongoStorePartition,
      permission: ActionObjectPermission,
  ) -> None:
      hacker_verify_key = SyftVerifyKey.from_string(
          test_verify_key_string_hacker
      )
  
      res = mongo_store_partition.init_store()
      assert res.is_ok()
  
      # root permission
      obj = MockSyftObject(data=1)
      permission_root = permission(
          uid=obj.id, credentials=root_verify_key
      )
      permission_client = permission(
          uid=obj.id, credentials=guest_verify_key
      )
      permission_hacker = permission(
          uid=obj.id, credentials=hacker_verify_key
      )
      mongo_store_partition.add_permission(permission_root)
      # only the root user has access to this permission
      assert mongo_store_partition.has_permission(permission_root)
      assert not mongo_store_partition.has_permission(permission_client)
      assert not mongo_store_partition.has_permission(permission_hacker)
  
      # client permission for another object
      obj_2 = MockSyftObject(data=2)
      permission_client_2 = permission(
          uid=obj_2.id, credentials=guest_verify_key
      )
      permission_root_2 = permission(
          uid=obj_2.id, credentials=root_verify_key
      )
      permisson_hacker_2 = permission(
          uid=obj_2.id, credentials=hacker_verify_key
      )
      mongo_store_partition.add_permission(permission_client_2)
      # the root (admin) and guest client should have this permission
      assert mongo_store_partition.has_permission(permission_root_2)
      assert mongo_store_partition.has_permission(permission_client_2)
      assert not mongo_store_partition.has_permission(
          permisson_hacker_2
      )
  
      # remove permissions
      mongo_store_partition.remove_permission(permission_root)
      assert not mongo_store_partition.has_permission(permission_root)
      assert not mongo_store_partition.has_permission(permission_client)
      assert not mongo_store_partition.has_permission(permission_hacker)
  
      mongo_store_partition.remove_permission(permission_client_2)
      assert not mongo_store_partition.has_permission(permission_root_2)
      assert not mongo_store_partition.has_permission(
          permission_client_2
      )
      assert not mongo_store_partition.has_permission(
          permisson_hacker_2
      )
  
imports: import sys
  from threading import Thread
  from typing import List
  from typing import Set
  from typing import Tuple
  from joblib import Parallel
  from joblib import delayed
  from pymongo.collection import Collection
  import pytest
  from result import Err
  from syft.node.credentials import SyftVerifyKey
  from syft.service.action.action_permissions import ActionObjectPermission
  from syft.service.action.action_permissions import ActionPermission
  from syft.service.action.action_store import ActionObjectEXECUTE
  from syft.service.action.action_store import ActionObjectOWNER
  from syft.service.action.action_store import ActionObjectREAD
  from syft.service.action.action_store import ActionObjectWRITE
  from syft.store.document_store import PartitionSettings
  from syft.store.document_store import QueryKey
  from syft.store.document_store import QueryKeys
  from syft.store.mongo_client import MongoStoreClientConfig
  from syft.store.mongo_document_store import MongoStoreConfig
  from syft.store.mongo_document_store import MongoStorePartition
  from .store_constants_test import generate_db_name
  from .store_constants_test import test_verify_key_string_hacker
  from .store_fixtures_test import mongo_store_partition_fn
  from .store_mocks_test import MockObjectType
  from .store_mocks_test import MockSyftObject
label_desc: Use image node_id 15 for calling a global function with example usage: test_mongo_store_partition_has_permission(root_verify_key, guest_verify_key, mongo_store_partition, permission) without return types