code: def test_object_deref(workflow_start_regular_shared):
      @ray.remote
      def empty_list():
          return [1]
  
      @ray.remote
      def receive_workflow(workflow):
          pass
  
      @ray.remote
      def return_workflow():
          return empty_list.bind()
  
      @ray.remote
      def return_data() -> ray.ObjectRef:
          return ray.put(np.ones(4096))
  
      @ray.remote
      def receive_data(data: "ray.ObjectRef[np.ndarray]"):
          return ray.get(data)
  
      # test we are forbidden from directly passing workflow to Ray.
      x = empty_list.bind()
      with pytest.raises(ValueError):
          ray.put(x)
      with pytest.raises(ValueError):
          ray.get(receive_workflow.remote(x))
      with pytest.raises(ValueError):
          ray.get(return_workflow.remote())
  
      # test return object ref
      obj = return_data.bind()
      arr: np.ndarray = workflow.run(receive_data.bind(obj))
      assert np.array_equal(arr, np.ones(4096))
  
file_path: ray/python/ray/workflow/tests/test_object_deref.py
imports: from typing import List, Dict
  from ray.tests.conftest import *
  import pytest
  import numpy
  import ray
  from ray import ObjectRef
  from ray import workflow
label_desc: Use image node_id 3 for calling a global function with example usage: test_object_deref(workflow_start_regular_shared) and returns: list, empty_list, ray, ray