code: def test_multithreaded_graph_store_set_and_add_edge(
      verify_key: SyftVerifyKey,
  ) -> None:
      thread_cnt = 5
      repeats = 3
  
      execution_err = None
      store_config = InMemoryGraphConfig()
      graph_store = InMemoryActionGraphStore(
          store_config=store_config, reset=True
      )
  
      def _cbk(tid: int) -> None:
          nonlocal execution_err
          for _idx in range(repeats):
              action_obj_a = ActionObject.from_obj([2, 4, 6])
              node_data_a = NodeActionData.from_action_obj(
                  action_obj_a, credentials=verify_key
              )
              res1 = graph_store.set(
                  node_data_a, credentials=verify_key
              )
              if res1.is_err():
                  execution_err = res1.err()
  
              action_obj_b = ActionObject.from_obj([3, 4, 6])
              node_data_b = NodeActionData.from_action_obj(
                  action_obj_b, credentials=verify_key
              )
              res2 = graph_store.set(
                  node_data_b, credentials=verify_key
              )
              if res2.is_err():
                  execution_err = res2.err()
  
              res3 = graph_store.add_edge(
                  node_data_a.id, node_data_b.id, credentials=verify_key
              )
              if res3.is_err():
                  execution_err = res3.err()
  
      tids = []
      for tid in range(thread_cnt):
          thread = Thread(target=_cbk, args=(tid,))
          thread.start()
  
          tids.append(thread)
  
      for thread in tids:
          thread.join()
  
      reqd_num_nodes = thread_cnt * repeats * 2
      reqd_num_edges = thread_cnt * repeats * 1
  
      assert execution_err is None
      assert len(graph_store.nodes(None).ok()) == reqd_num_nodes
      assert len(graph_store.edges(None).ok()) == reqd_num_edges
  
imports: import os
  from pathlib import Path
  import tempfile
  from threading import Thread
  import networkx
  from result import Err
  from syft.node.credentials import SyftVerifyKey
  from syft.service.action.action_graph import ExecutionStatus
  from syft.service.action.action_graph import InMemoryActionGraphStore
  from syft.service.action.action_graph import InMemoryGraphConfig
  from syft.service.action.action_graph import InMemoryStoreClientConfig
  from syft.service.action.action_graph import NetworkXBackingStore
  from syft.service.action.action_graph import NodeActionData
  from syft.service.action.action_graph import NodeActionDataUpdate
  from syft.service.action.action_graph import NodeType
  from syft.service.action.action_graph_service import ExecutionStatusPartitionKey
  from syft.service.action.action_object import Action
  from syft.service.action.action_object import ActionObject
  from syft.store.document_store import QueryKeys
  from syft.store.locks import NoLockingConfig
  from syft.types.datetime import DateTime
  from syft.types.syft_metaclass import Empty
  from syft.types.uid import UID
  from .fixtures import create_action_node
  from .fixtures import create_action_obj_node
label_desc: Use image node_id 16 for calling a global function with example usage: test_multithreaded_graph_store_set_and_add_edge(verify_key) without return types