code: def _is_transient_error(
      result_status: ResultStatus, runtime: int
  ) -> bool:
      """
      Classify whether an infra-failure issue is a transient issue. This is based on
      the status of its previous retries, and its runtime.
      """
      retry_count = int(os.environ.get("BUILDKITE_RETRY_COUNT", 0))
      max_retry = int(os.environ.get("BUILDKITE_MAX_RETRIES", 1))
      if retry_count >= max_retry:
          # Already reach retry limit
          return False
      if runtime > int(
          os.environ.get("BUILDKITE_TIME_LIMIT_FOR_RETRY", 0)
      ):
          # Take too long to run
          return False
      return True
  
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 1 for calling a global function with example usage: _is_transient_error(result_status, runtime) and returns: True, False, False