code: def handle_exception(
      e: Exception, run_duration: int
  ) -> Tuple[ExitCode, ResultStatus, Optional[int]]:
      from ray_release.exception import ReleaseTestError
  
      if not isinstance(e, ReleaseTestError):
          return ExitCode.UNKNOWN, ResultStatus.UNKNOWN, 0
      exit_code = e.exit_code
      if 1 <= exit_code.value < 10:
          result_status = ResultStatus.RUNTIME_ERROR
          runtime = None
      elif 10 <= exit_code.value < 20:
          result_status = ResultStatus.INFRA_ERROR
          runtime = None
      elif 30 <= exit_code.value < 40:
          result_status = ResultStatus.INFRA_TIMEOUT
          runtime = None
      elif exit_code == ExitCode.COMMAND_TIMEOUT:
          result_status = ResultStatus.TIMEOUT
          runtime = 0
      elif 40 <= exit_code.value:
          result_status = ResultStatus.ERROR
          runtime = 0
  
      # if this result is to be retried, mark its status as transient
      # this logic should be in-sync with run_release_test.sh
      if _is_transient_error(result_status, run_duration):
          result_status = ResultStatus.TRANSIENT_INFRA_ERROR
  
      return exit_code, result_status, runtime
  
file_path: ray/release/ray_release/result.py
imports: import enum
  import os
  from dataclasses import dataclass
  from typing import Optional, Dict, Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: handle_exception(e, run_duration) and returns: exit_code,  result_status,  runtime, ExitCode,  ResultStatus,  int