class_docstr: Base Rate Limiter class for both sync and async versions.
code: def _retries_gen(self, args, kwargs):
      for i, is_last_try in zip(
          count(), _is_last_gen(self.max_retries)
      ):
          try:
              yield i  # Run the function.
          except self._retry_exceptions:
              if is_last_try:
                  yield True  # The exception should be raised
              else:
                  logger.warning(
                      type(self).__name__
                      + " caught an error, retrying "
                      "(%s/%s tries). Called with (*%r, **%r).",
                      i,
                      self.max_retries,
                      args,
                      kwargs,
                      exc_info=True,
                  )
                  yield False  # The exception has been swallowed.
                  continue
          else:
              # A successful run -- stop retrying:
              return
  
imports: import asyncio
  import inspect
  import threading
  from itertools import chain, count
  from time import sleep
  from timeit import default_timer
  from geopy.exc import GeocoderServiceError
  from geopy.util import logger
label_desc: Use image node_id 4 for calling the BaseRateLimiter obj's underlying member method code with example usage: obj._retries_gen(args, kwargs) without return types