code: def test_nested_catch_exception_3(
      workflow_start_regular_shared, tmp_path
  ):
      """Test the case where the exception is not raised by the output task of
      a nested DAG."""
  
      @ray.remote
      def f3():
          return 10
  
      @ray.remote
      def f3_exc():
          raise ValueError()
  
      @ray.remote
      def f2(x):
          return x
  
      @ray.remote
      def f1(exc):
          if exc:
              return workflow.continuation(f2.bind(f3_exc.bind()))
          else:
              return workflow.continuation(f2.bind(f3.bind()))
  
      ret, err = workflow.run(
          f1.options(**workflow.options(catch_exceptions=True)).bind(
              True
          )
      )
      assert ret is None
      assert isinstance(err, ValueError)
  
      assert (10, None) == workflow.run(
          f1.options(**workflow.options(catch_exceptions=True)).bind(
              False
          )
      )
  
file_path: ray/python/ray/workflow/tests/test_error_handling.py
imports: import pytest
  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_nested_catch_exception_3(workflow_start_regular_shared, tmp_path) and returns: int, x, workflow, workflow