code: def _retries(self, url):
      if not self.is_internet_access_allowed:
          # Assume that *all* geocoders require Internet access
          pytest.skip("Skipping a test requiring Internet access")
  
      self.requests_monitor.record_request(url)
  
      netloc = netloc_from_url(url)
      retries = max_retries
  
      if netloc in no_retries_for_hosts:
          retries = 0
  
      for i in range(retries + 1):
          try:
              with self.requests_monitor.record_response(url):
                  yield
          except AdapterHTTPError as error:
              if not self.retries_enabled_session.value:
                  raise
  
              if (
                  i == retries
                  or error.status_code not in retry_status_codes
              ):
                  # Note: we shouldn't blindly retry on any >=400 code,
                  # because some of them are actually expected in tests
                  # (like input validation verification).
  
                  # TODO Retry failures with the 200 code?
                  # Some geocoders return failures with 200 code
                  # (like GoogleV3 for Quota Exceeded).
                  # Should we detect this somehow to restart such requests?
                  #
                  # Re-raise -- don't retry this request
                  raise
              else:
                  # Swallow the error and retry the request
                  pass
          except Exception:
              if i == retries:
                  raise
          else:
              yield None
              return
  
          self.requests_monitor.record_retry(url)
          yield error_wait_seconds
      raise RuntimeError("Should not have been reached")
  
imports: import asyncio
  import atexit
  import contextlib
  import importlib
  import os
  import types
  from collections import defaultdict
  from functools import partial
  from statistics import mean, median
  from time import sleep
  from timeit import default_timer
  from unittest.mock import patch
  from urllib.parse import urlparse
  import pytest
  import geopy.geocoders
  from geopy.adapters import AdapterHTTPError, BaseAsyncAdapter, BaseSyncAdapter
  from geopy.geocoders.base import _DEFAULT_ADAPTER_CLASS
label_desc: Use image node_id 4 for calling the BaseAdapterProxy obj's underlying member method code with example usage: obj._retries(url) without return types