class_docstr: GeoNames geocoder.
  
  Documentation at:
      http://www.geonames.org/export/geonames-search.html
  
  Reverse geocoding documentation at:
      http://www.geonames.org/export/web-services.html#findNearbyPlaceName
class_docstr_tok: ["GeoNames","geocoder",".","Documentation","at",":","http",":","\/\/www.geonames.org\/export\/geonames-search.html","Reverse","geocoding","documentation","at",":","http",":","\/\/www.geonames.org\/export\/web-services.html","#","findNearbyPlaceName"]
docstr: Return an address by location point.
  
  :param query: The coordinates for which you wish to obtain the
      closest human-readable addresses.
  :type query: :class:`geopy.point.Point`, list or tuple of ``(latitude,
      longitude)``, or string as ``"%(latitude)s, %(longitude)s"``.
  
  :param bool exactly_one: Return one result or a list of results, if
      available.
  
  :param int timeout: Time, in seconds, to wait for the geocoding service
      to respond before raising a :class:`geopy.exc.GeocoderTimedOut`
      exception. Set this only if you wish to override, on this call
      only, the value set during the geocoder's initialization.
  
  :param str feature_code: A GeoNames feature code
  
  :param str lang: language of the returned ``name`` element (the pseudo
      language code 'local' will return it in local language)
      Full list of supported languages can be found here:
      https://www.geonames.org/countries/
  
  :param str find_nearby_type: A flag to switch between different
      GeoNames API endpoints. The default value is ``findNearbyPlaceName``
      which returns the closest populated place. Another currently
      implemented option is ``findNearby`` which returns
      the closest toponym for the lat/lng query.
  
  :rtype: ``None``, :class:`geopy.location.Location` or a list of them, if
      ``exactly_one=False``.
docstr_tok: ["Return","an","address","by","location","point",".",":","param","query",":","The","coordinates","for","which","you","wish","to","obtain","the","closest","human-readable","addresses",".",":","type","query",":",":","class",":","`","geopy.point.Point","`",",","list","or","tuple","of","``","(","latitude",",","longitude",")","``",",","or","string","as","``","``","%","(","latitude",")","s",",","%","(","longitude",")","s","''","``",".",":","param","bool","exactly_one",":","Return","one","result","or","a","list","of","results",",","if","available",".",":","param","int","timeout",":","Time",",","in","seconds",",","to","wait","for","the","geocoding","service","to","respond","before","raising","a",":","class",":","`","geopy.exc.GeocoderTimedOut","`","exception",".","Set","this","only","if","you","wish","to","override",",","on","this","call","only",",","the","value","set","during","the","geocoder","'s","initialization",".",":","param","str","feature_code",":","A","GeoNames","feature","code",":","param","str","lang",":","language","of","the","returned","``","name","``","element","(","the","pseudo","language","code","'local","'","will","return","it","in","local","language",")","Full","list","of","supported","languages","can","be","found","here",":","https",":","\/\/www.geonames.org\/countries\/",":","param","str","find_nearby_type",":","A","flag","to","switch","between","different","GeoNames","API","endpoints",".","The","default","value","is","``","findNearbyPlaceName","``","which","returns","the","closest","populated","place",".","Another","currently","implemented","option","is","``","findNearby","``","which","returns","the","closest","toponym","for","the","lat\/lng","query",".",":","rtype",":","``","None","``",",",":","class",":","`","geopy.location.Location","`","or","a","list","of","them",",","if","``","exactly_one=False","``","."]
code: def reverse(
      self,
      query,
      *,
      exactly_one=True,
      timeout=DEFAULT_SENTINEL,
      feature_code=None,
      lang=None,
      find_nearby_type="findNearbyPlaceName",
  ):
      """
      Return an address by location point.
  
      :param query: The coordinates for which you wish to obtain the
          closest human-readable addresses.
      :type query: :class:`geopy.point.Point`, list or tuple of ``(latitude,
          longitude)``, or string as ``"%(latitude)s, %(longitude)s"``.
  
      :param bool exactly_one: Return one result or a list of results, if
          available.
  
      :param int timeout: Time, in seconds, to wait for the geocoding service
          to respond before raising a :class:`geopy.exc.GeocoderTimedOut`
          exception. Set this only if you wish to override, on this call
          only, the value set during the geocoder's initialization.
  
      :param str feature_code: A GeoNames feature code
  
      :param str lang: language of the returned ``name`` element (the pseudo
          language code 'local' will return it in local language)
          Full list of supported languages can be found here:
          https://www.geonames.org/countries/
  
      :param str find_nearby_type: A flag to switch between different
          GeoNames API endpoints. The default value is ``findNearbyPlaceName``
          which returns the closest populated place. Another currently
          implemented option is ``findNearby`` which returns
          the closest toponym for the lat/lng query.
  
      :rtype: ``None``, :class:`geopy.location.Location` or a list of them, if
          ``exactly_one=False``.
  
      """
  
      try:
          lat, lng = self._coerce_point_to_string(query).split(",")
      except ValueError:
          raise ValueError("Must be a coordinate pair or Point")
  
      if find_nearby_type == "findNearbyPlaceName":  # default
          if feature_code:
              raise ValueError(
                  "find_nearby_type=findNearbyPlaceName doesn't support "
                  "the `feature_code` param"
              )
          params = self._reverse_find_nearby_place_name_params(
              lat=lat,
              lng=lng,
              lang=lang,
          )
          url = "?".join((self.api_reverse, urlencode(params)))
      elif find_nearby_type == "findNearby":
          if lang:
              raise ValueError(
                  "find_nearby_type=findNearby doesn't support the `lang` param"
              )
          params = self._reverse_find_nearby_params(
              lat=lat,
              lng=lng,
              feature_code=feature_code,
          )
          url = "?".join((self.api_reverse_nearby, urlencode(params)))
      else:
          raise GeocoderQueryError(
              "`%s` find_nearby_type is not supported by geopy"
              % find_nearby_type
          )
  
      logger.debug("%s.reverse: %s", self.__class__.__name__, url)
      callback = partial(self._parse_json, exactly_one=exactly_one)
      return self._call_geocoder(url, callback, timeout=timeout)
  
file_path: geopy/geopy/geocoders/geonames.py
imports: from functools import partial
  from urllib.parse import urlencode
  from geopy.exc import GeocoderAuthenticationFailure, GeocoderInsufficientPrivileges, GeocoderQueryError, GeocoderQuotaExceeded, GeocoderServiceError
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.timezone import ensure_pytz_is_installed, from_fixed_gmt_offset, from_timezone_name
  from geopy.util import logger
label_desc: Use image node_id 3 for calling the GeoNames obj's underlying member method code with example usage: obj.reverse(query) and returns: self