code: def get_retry_decorator(
      operation: str,
      max_attempts: int,
      wait_exponential_multiplier_seconds: int,
      retry_on_result: Callable,
  ) -> Callable:
      """
      Create a decorator that will retry with exponential backoff.
      """
  
      def wait(attempts: int, delay: float) -> float:
          """
          Wait function to pass into `Retrying` that logs and returns the amount of time to sleep
          depending on the number of attempts and delay (in milliseconds).
          """
          hlog(
              f"{operation} failed. Retrying (attempt #{attempts + 1}) in {delay // 1000} seconds..."
          )
          return _retrying.exponential_sleep(attempts, delay)
  
      _retrying = Retrying(
          retry_on_result=retry_on_result,
          wait_func=wait,
          stop_max_attempt_number=max_attempts,
          # Used to calculate the wait between retries (2^r * wait_exponential_multiplier_seconds seconds)
          wait_exponential_multiplier=wait_exponential_multiplier_seconds
          * 1000,
      )
  
      return lambda f: lambda *args, **kwargs: _retrying.call(
          f, *args, **kwargs
      )
  
imports: from typing import Callable, Union
  from retrying import Retrying
  from helm.common.request import RequestResult
  from helm.common.tokenization_request import TokenizationRequestResult
  from helm.common.hierarchical_logger import hlog
label_desc: Use image node_id 1 for calling a global function with example usage: get_retry_decorator(operation, max_attempts, wait_exponential_multiplier_seconds, retry_on_result) and returns: function, _retrying