code: def test_user_code_status_change(faker: Faker, worker: Worker):
      root_client = worker.root_client
      dummy_data = [1, 2, 3]
      data = ActionObject.from_obj(dummy_data)
      action_obj = root_client.api.services.action.set(data)
  
      ds_client = get_ds_client(faker, root_client, worker.guest_client)
  
      @syft.syft_function(
          input_policy=syft.ExactMatch(data=action_obj),
          output_policy=syft.SingleExecutionExactOutput(),
      )
      def simple_function(data):
          return sum(data)
  
      simple_function.code = dedent(simple_function.code)
      result = ds_client.code.submit(simple_function)
      assert isinstance(result, SyftSuccess)
  
      user_code = ds_client.code.get_all()[0]
  
      linked_obj = LinkedObject.from_obj(user_code, node_uid=worker.id)
  
      user_code_change = UserCodeStatusChange(
          value=UserCodeStatus.APPROVED, linked_obj=linked_obj
      )
  
      change_context = ChangeContext(
          node=worker,
          approving_user_credentials=root_client.credentials.verify_key,
          requesting_user_credentials=ds_client.credentials.verify_key,
      )
  
      result = user_code_change.apply(change_context)
  
      user_code = ds_client.code.get_all()[0]
  
      assert user_code.status.approved
  
      result = user_code_change.undo(change_context)
      assert result.is_ok()
  
      user_code = ds_client.code.get_all()[0]
  
      assert not user_code.status.approved
  
imports: from textwrap import dedent
  from faker import Faker
  import pytest
  import syft
  from syft.client.client import SyftClient
  from syft.node.worker import Worker
  from syft.service.action.action_object import ActionObject
  from syft.service.action.action_permissions import ActionPermission
  from syft.service.code.user_code import UserCodeStatus
  from syft.service.context import ChangeContext
  from syft.service.request.request import ActionStoreChange
  from syft.service.request.request import ObjectMutation
  from syft.service.request.request import RequestStatus
  from syft.service.request.request import UserCodeStatusChange
  from syft.service.request.request_service import RequestService
  from syft.service.response import SyftError
  from syft.service.response import SyftSuccess
  from syft.service.settings.settings_service import SettingsService
  from syft.store.document_store import DocumentStore
  from syft.store.linked_obj import LinkedObject
label_desc: Use image node_id 5 for calling a global function with example usage: test_user_code_status_change(faker, worker) and returns: sum