class_docstr: What3Words geocoder using the legacy V2 API.
  
  Documentation at:
      https://docs.what3words.com/api/v2/
  
  .. attention::
      Consider using :class:`.What3WordsV3` instead.
docstr: Return a `3 words` address by location point. Each point on surface has
  a `3 words` address, so there's always a non-empty response.
  
  :param query: The coordinates for which you wish to obtain the 3 word
      address.
  :type query: :class:`geopy.point.Point`, list or tuple of ``(latitude,
      longitude)``, or string as ``"%(latitude)s, %(longitude)s"``.
  
  :param str lang: two character language code as supported by the
      API (https://docs.what3words.com/api/v2/#lang).
  
  :param bool exactly_one: Return one result or a list of results, if
      available. Due to the address scheme there is always exactly one
      result for each `3 words` address, so this parameter is rather
      useless for this geocoder.
  
  :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.
  
  :rtype: :class:`geopy.location.Location` or a list of them, if
      ``exactly_one=False``.
docstr_tok: ["Return","a","`","3","words","`","address","by","location","point",".","Each","point","on","surface","has","a","`","3","words","`","address",",","so","there","'s","always","a","non-empty","response",".",":","param","query",":","The","coordinates","for","which","you","wish","to","obtain","the","3","word","address",".",":","type","query",":",":","class",":","`","geopy.point.Point","`",",","list","or","tuple","of","``","(","latitude",",","longitude",")","``",",","or","string","as","``","``","%","(","latitude",")","s",",","%","(","longitude",")","s","''","``",".",":","param","str","lang",":","two","character","language","code","as","supported","by","the","API","(","https",":","\/\/docs.what3words.com\/api\/v2\/","#","lang",")",".",":","param","bool","exactly_one",":","Return","one","result","or","a","list","of","results",",","if","available",".","Due","to","the","address","scheme","there","is","always","exactly","one","result","for","each","`","3","words","`","address",",","so","this","parameter","is","rather","useless","for","this","geocoder",".",":","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",".",":","rtype",":",":","class",":","`","geopy.location.Location","`","or","a","list","of","them",",","if","``","exactly_one=False","``","."]
code: def reverse(
      self,
      query,
      *,
      lang="en",
      exactly_one=True,
      timeout=DEFAULT_SENTINEL,
  ):
      """
      Return a `3 words` address by location point. Each point on surface has
      a `3 words` address, so there's always a non-empty response.
  
      :param query: The coordinates for which you wish to obtain the 3 word
          address.
      :type query: :class:`geopy.point.Point`, list or tuple of ``(latitude,
          longitude)``, or string as ``"%(latitude)s, %(longitude)s"``.
  
      :param str lang: two character language code as supported by the
          API (https://docs.what3words.com/api/v2/#lang).
  
      :param bool exactly_one: Return one result or a list of results, if
          available. Due to the address scheme there is always exactly one
          result for each `3 words` address, so this parameter is rather
          useless for this geocoder.
  
      :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.
  
      :rtype: :class:`geopy.location.Location` or a list of them, if
          ``exactly_one=False``.
  
      """
      lang = lang.lower()
  
      params = {
          "coords": self._coerce_point_to_string(query),
          "lang": lang.lower(),
          "key": self.api_key,
      }
  
      url = "?".join((self.reverse_api, urlencode(params)))
  
      logger.debug("%s.reverse: %s", self.__class__.__name__, url)
      callback = partial(
          self._parse_reverse_json, exactly_one=exactly_one
      )
      return self._call_geocoder(url, callback, timeout=timeout)
  
imports: import re
  from functools import partial
  from urllib.parse import urlencode
  from geopy import exc
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 4 for calling the What3Words obj's underlying member method code with example usage: obj.reverse(query) and returns: self