code: def test_run_off_main_thread(workflow_start_regular_shared):
      @ray.remote
      def fake_data(num: int):
          return list(range(num))
  
      succ = False
  
      # Start new thread here ⚠️
      def run():
          global succ
          # Setup the workflow.
          assert workflow.run(
              fake_data.bind(10), workflow_id="run"
          ) == list(range(10))
  
      import threading
  
      t = threading.Thread(target=run)
      t.start()
      t.join()
      assert workflow.get_status("run") == workflow.SUCCESSFUL
  
file_path: ray/python/ray/workflow/tests/test_basic_workflows_3.py
imports: import pytest
  from filelock import FileLock
  from pathlib import Path
  import ray
  from ray import workflow
  from ray.tests.conftest import *
label_desc: Use image node_id 3 for calling a global function with example usage: test_run_off_main_thread(workflow_start_regular_shared) and returns: list