class_docstr: Geocoder using the ERSI ArcGIS API.
  
  Documentation at:
      https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm
class_docstr_tok: ["Geocoder","using","the","ERSI","ArcGIS","API",".","Documentation","at",":","https",":","\/\/developers.arcgis.com\/rest\/geocode\/api-reference\/overview-world-geocoding-service.htm"]
code: def _authenticated_call_geocoder(
      self, url, parse_callback, *, timeout=DEFAULT_SENTINEL
  ):
      if not self.username:
          return self._call_geocoder(
              url, parse_callback, timeout=timeout
          )
  
      def query_callback():
          call_url = "&".join((url, urlencode({"token": self.token})))
          headers = {"Referer": self.referer}
          return self._call_geocoder(
              call_url,
              partial(
                  maybe_reauthenticate_callback, from_token=self.token
              ),
              timeout=timeout,
              headers=headers,
          )
  
      def maybe_reauthenticate_callback(response, *, from_token):
          if "error" in response:
              if response["error"]["code"] == self._TOKEN_EXPIRED:
                  return self._refresh_authentication_token(
                      query_retry_callback,
                      timeout=timeout,
                      from_token=from_token,
                  )
          return parse_callback(response)
  
      def query_retry_callback():
          call_url = "&".join((url, urlencode({"token": self.token})))
          headers = {"Referer": self.referer}
          return self._call_geocoder(
              call_url, parse_callback, timeout=timeout, headers=headers
          )
  
      if self.token is None or int(time()) > self.token_expiry:
          return self._refresh_authentication_token(
              query_callback, timeout=timeout, from_token=self.token
          )
      else:
          return query_callback()
  
file_path: geopy/geopy/geocoders/arcgis.py
imports: import json
  from functools import partial
  from time import time
  from urllib.parse import urlencode
  from geopy.exc import ConfigurationError, GeocoderAuthenticationFailure, GeocoderServiceError
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder, _synchronized
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 6 for calling the ArcGIS obj's underlying member method code with example usage: obj._authenticated_call_geocoder(url, parse_callback) and returns: self, self, parse_callback, self, self, query_callback, self