code: def custom_retry_strategy(
      func: Any, num_retries: int, delay_s: int
  ) -> str:
      import time
  
      @ray.remote
      def handle_result(
          res: Tuple[Optional[str], Optional[Exception]]
      ) -> str:
          result, error = res
          if result:
              return res
          elif num_retries <= 0:
              raise error
          else:
              print("Retrying exception after delay", error)
              time.sleep(delay_s)
              return workflow.continuation(
                  custom_retry_strategy.bind(
                      func, num_retries - 1, delay_s
                  )
              )
  
      res = func.options(
          **workflow.options(catch_exceptions=True)
      ).bind()
      return workflow.continuation(handle_result.bind(res))
  
imports: from typing import Any, Tuple, Optional
  import ray
  from ray import workflow
label_desc: Use image node_id 2 for calling a global function with example usage: custom_retry_strategy(func, num_retries, delay_s) and returns: workflow, res, workflow