code: def test_get_named_task_duplicate(workflow_start_regular):
      @workflow.options(task_id="f")
      @ray.remote
      def f(n, dep):
          return n
  
      inner = f.bind(10, None)
      outer = f.bind(20, inner)
      assert 20 == workflow.run(outer, workflow_id="duplicate")
      # The outer will be checkpointed first. So there is no suffix for the name
      assert workflow.get_output("duplicate", task_id="f") == 10
      # The inner will be checkpointed after the outer. And there is a duplicate
      # for the name. suffix _1 is added automatically
      assert workflow.get_output("duplicate", task_id="f_1") == 20
  
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 13 for calling a global function with example usage: test_get_named_task_duplicate(workflow_start_regular) and returns: n