code: def test_plan(worker):
      root_domain_client = worker.root_client
      guest_client = worker.guest_client
  
      @planify
      def my_plan(x=np.array([[2, 2, 2], [2, 2, 2]])):  # noqa: B008
          y = x.flatten()
          z = y.prod()
          return z
  
      plan_ptr = my_plan.send(guest_client)
      input_obj = TwinObject(
          private_obj=np.array([[3, 3, 3], [3, 3, 3]]),
          mock_obj=np.array([[1, 1, 1], [1, 1, 1]]),
      )
  
      input_obj = root_domain_client.api.services.action.set(input_obj)
      pointer = guest_client.api.services.action.get_pointer(
          input_obj.id
      )
      res_ptr = plan_ptr(x=pointer)
  
      # guest cannot access result
      assert not isinstance(
          guest_client.api.services.action.get(res_ptr.id), ActionObject
      )
  
      # root can access result
      assert (
          root_domain_client.api.services.action.get(res_ptr.id)
          == np.array([[3, 3, 3], [3, 3, 3]]).flatten().prod()
      )
  
      # guest can request result
      res_ptr.request(guest_client)
  
      # root approves result
      root_domain_client.api.services.request[-1].approve_with_client(
          root_domain_client
      )
  
      assert res_ptr.get_from(guest_client) == 729
  
file_path: PySyft/packages/syft/tests/syft/eager_test.py
imports: import numpy
  from syft.service.action.action_object import ActionObject
  from syft.service.action.plan import planify
  from syft.types.twin_object import TwinObject
label_desc: Use image node_id 2 for calling a global function with example usage: test_plan(worker) and returns: z