code: def from_int(cls, retries, redirect=True, default=None):
          
          if retries is None:
              retries = default if default is not None else cls.DEFAULT
  
          if isinstance(retries, Retry):
              return retries
  
          redirect = bool(redirect) and None
          new_retries = cls(retries, redirect=redirect)
          log.debug("Converted retries value: %r -> %r" % (retries, new_retries))
          return new_retries
docs: Backwards-compatibility for the old retries format.