class_docstr: Jittered exponential backoff: sleep times increase ~exponentially up to some limit.
class_docstr_tok: ["Jittered","exponential","backoff",":","sleep","times","increase","~exponentially","up","to","some","limit","."]
code: def next_sleep_or_reraise(self, exc: Exception) -> datetime.timedelta:
      if self._remaining_retries is not None:
          if self._remaining_retries <= 0:
              raise exc
          self._remaining_retries -= 1
  
      if self._timeout_at is not None and NOW_FN() > self._timeout_at:
          raise exc
  
      result, self._next_sleep = self._next_sleep, min(
          self._max_sleep, self._next_sleep * (1 + random.random())
      )
  
      return result
  
imports: import abc
  import asyncio
  import datetime
  import functools
  import logging
  import os
  import random
  import threading
  import time
  from typing import Any, Awaitable, Callable, Generic, Optional, Tuple, Type, TypeVar
  from requests import HTTPError
  import wandb
  from wandb.util import CheckRetryFnType
  from .mailbox import ContextCancelledError
label_desc: Use image node_id 2 for calling the ExponentialBackoff obj's underlying member method code with example usage: obj.next_sleep_or_reraise(exc) and returns: result