code: def test_task_id_generation(workflow_start_regular_shared, request):
      @ray.remote
      def simple(x):
          return x + 1
  
      x = simple.options(**workflow.options(task_id="simple")).bind(-1)
      n = 20
      for i in range(1, n):
          x = simple.options(**workflow.options(task_id="simple")).bind(
              x
          )
  
      workflow_id = "test_task_id_generation"
      ret = workflow.run_async(x, workflow_id=workflow_id)
      outputs = [
          workflow.get_output_async(workflow_id, task_id="simple")
      ]
      for i in range(1, n):
          outputs.append(
              workflow.get_output_async(
                  workflow_id, task_id=f"simple_{i}"
              )
          )
      assert ray.get(ret) == n - 1
      assert ray.get(outputs) == list(range(n))
  
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 4 for calling a global function with example usage: test_task_id_generation(workflow_start_regular_shared, request) and returns: unknown