code: def test_get_named_task_output_running(
      workflow_start_regular, tmp_path
  ):
      @ray.remote
      def double(v, lock=None):
          if lock is not None:
              with FileLock(lock_path):
                  return 2 * v
          else:
              return 2 * v
  
      # Get the result from named task after workflow before it's finished
      lock_path = str(tmp_path / "lock")
      lock = FileLock(lock_path)
      lock.acquire()
      output = workflow.run_async(
          double.options(**workflow.options(task_id="outer")).bind(
              double.options(**workflow.options(task_id="inner")).bind(
                  1, lock_path
              ),
              lock_path,
          ),
          workflow_id="double-2",
      )
  
      inner = workflow.get_output_async("double-2", task_id="inner")
      outer = workflow.get_output_async("double-2", task_id="outer")
  
      @ray.remote
      def wait(obj_ref):
          return ray.get(obj_ref[0])
  
      # Make sure nothing is finished.
      ready, waiting = ray.wait(
          [
              wait.remote([output]),
              wait.remote([inner]),
              wait.remote([outer]),
          ],
          timeout=1,
      )
      assert 0 == len(ready)
      assert 3 == len(waiting)
  
      # Once job finished, we'll be able to get the result.
      lock.release()
      assert [4, 2, 4] == ray.get([output, inner, outer])
  
      inner = workflow.get_output_async("double-2", task_id="inner")
      outer = workflow.get_output_async("double-2", task_id="outer")
      assert [2, 4] == ray.get([inner, outer])
  
file_path: ray/python/ray/workflow/tests/test_basic_workflows_2.py
imports: import pytest
  import ray
  from filelock import FileLock
  from ray._private.test_utils import SignalActor
  from ray import workflow
  from ray.tests.conftest import *
  from ray._private.test_utils import skip_flaky_core_test_premerge
label_desc: Use image node_id 10 for calling a global function with example usage: test_get_named_task_output_running(workflow_start_regular, tmp_path) and returns: ray, unknown, unknown