code: def test_get_named_task_default(workflow_start_regular, tmp_path):
      @ray.remote
      def factorial(n, r=1):
          if n == 1:
              return r
          return workflow.continuation(factorial.bind(n - 1, r * n))
  
      import math
  
      assert math.factorial(5) == workflow.run(
          factorial.bind(5), workflow_id="factorial"
      )
      for i in range(5):
          task_name = (
              "python.ray.workflow.tests.test_basic_workflows_2."
              "test_get_named_task_default.locals.factorial"
          )
  
          if i != 0:
              task_name += "_" + str(i)
          # All outputs will be 120
          assert math.factorial(5) == workflow.get_output(
              "factorial", task_id=task_name
          )
  
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 12 for calling a global function with example usage: test_get_named_task_default(workflow_start_regular, tmp_path) and returns: workflow, r