class_docstr: Retry a specific number of times after a failure
class_docstr_tok: ["Retry","a","specific","number","of","times","after","a","failure"]
docstr: Initialize a `Retry` object with a `Backoff` object
  that retries a maximum of `retries` times.
  `retries` can be negative to retry forever.
  You can specify the types of supported errors which trigger
  a retry with the `supported_errors` parameter.
docstr_tok: ["Initialize","a","`","Retry","`","object","with","a","`","Backoff","`","object","that","retries","a","maximum","of","`","retries","`","times",".","`","retries","`","can","be","negative","to","retry","forever",".","You","can","specify","the","types","of","supported","errors","which","trigger","a","retry","with","the","`","supported_errors","`","parameter","."]
code: def __init__(
      self,
      backoff: "AbstractBackoff",
      retries: int,
      supported_errors: Tuple[Type[RedisError], ...] = (
          ConnectionError,
          TimeoutError,
      ),
  ):
      """
      Initialize a `Retry` object with a `Backoff` object
      that retries a maximum of `retries` times.
      `retries` can be negative to retry forever.
      You can specify the types of supported errors which trigger
      a retry with the `supported_errors` parameter.
      """
      self._backoff = backoff
      self._retries = retries
      self._supported_errors = supported_errors
  
imports: from asyncio import sleep
  from typing import TYPE_CHECKING, Any, Awaitable, Callable, Tuple, Type, TypeVar
  from redis.exceptions import ConnectionError, RedisError, TimeoutError
label_desc: Use image node_id 1 to create a new Retry object  with example: obj = Retry(backoff, retries, supported_errors)