code: def handle_errors(
      car_req_id: str,
      hotel_req_id: str,
      flight_req_id: str,
      final_result: Tuple[Optional[str], Optional[Exception]],
  ) -> str:
      result, error = final_result
  
      @ray.remote
      def wait_all(*deps) -> None:
          pass
  
      @ray.remote
      def cancel(request_id: str) -> None:
          make_request("cancel", request_id)
  
      if error:
          return workflow.continuation(
              wait_all.bind(
                  cancel.bind(car_req_id),
                  cancel.bind(hotel_req_id),
                  cancel.bind(flight_req_id),
              )
          )
      else:
          return result
  
file_path: ray/python/ray/workflow/examples/comparisons/cadence/trip_booking_workflow.py
imports: from typing import List, Tuple, Optional
  import ray
  from ray import workflow
label_desc: Use image node_id 7 for calling a global function with example usage: handle_errors(car_req_id, hotel_req_id, flight_req_id, final_result) and returns: workflow, result