class_docstr: Geocoder using the HERE Geocoder API.
  
  Documentation at:
      https://developer.here.com/documentation/geocoder/
  
  .. attention::
      This class uses a v6 API which is in maintenance mode.
      Consider using the newer :class:`.HereV7` class.
docstr: Return a location point by address.
  
  This implementation supports only a subset of all available parameters.
  A list of all parameters of the pure REST API is available here:
  https://developer.here.com/documentation/geocoder/topics/resource-geocode.html
  
  :param query: The address or query you wish to geocode.
  
      For a structured query, provide a dictionary whose keys
      are one of: `city`, `county`, `district`, `country`, `state`,
      `street`, `housenumber`, or `postalcode`.
  :type query: str or dict
  
  :param bbox: A type of spatial filter, limits the search for any other attributes
      in the request. Specified by two coordinate (lat/lon)
      pairs -- corners of the box. `The bbox search is currently similar
      to mapview but it is not extended` (cited from the REST API docs).
      Relevant global results are also returned.
      Example: ``[Point(22, 180), Point(-22, -180)]``.
  :type bbox: list or tuple of 2 items of :class:`geopy.point.Point` or
      ``(latitude, longitude)`` or ``"%(latitude)s, %(longitude)s"``.
  
  :param mapview: The app's viewport, given as two coordinate pairs, specified
      by two lat/lon pairs -- corners of the bounding box,
      respectively. Matches from within the set map view plus an extended area
      are ranked highest. Relevant global results are also returned.
      Example: ``[Point(22, 180), Point(-22, -180)]``.
  :type mapview: list or tuple of 2 items of :class:`geopy.point.Point` or
      ``(latitude, longitude)`` or ``"%(latitude)s, %(longitude)s"``.
  
  :param bool exactly_one: Return one result or a list of results, if
      available.
  
  :param int maxresults: Defines the maximum number of items in the
      response structure. If not provided and there are multiple results
      the HERE API will return 10 results by default. This will be reset
      to one if ``exactly_one`` is True.
  
  :param int pageinformation: A key which identifies the page to be returned
      when the response is separated into multiple pages. Only useful when
      ``maxresults`` is also provided.
  
  :param str language: Affects the language of the response,
      must be a RFC 4647 language code, e.g. 'en-US'.
  
  :param str additional_data: A string with key-value pairs as described on
      https://developer.here.com/documentation/geocoder/topics/resource-params-additional.html.
      These will be added as one query parameter to the URL.
  
  :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: ``None``, :class:`geopy.location.Location` or a list of them, if
      ``exactly_one=False``.
docstr_tok: ["Return","a","location","point","by","address",".","This","implementation","supports","only","a","subset","of","all","available","parameters",".","A","list","of","all","parameters","of","the","pure","REST","API","is","available","here",":","https",":","\/\/developer.here.com\/documentation\/geocoder\/topics\/resource-geocode.html",":","param","query",":","The","address","or","query","you","wish","to","geocode",".","For","a","structured","query",",","provide","a","dictionary","whose","keys","are","one","of",":","`","city","`",",","`","county","`",",","`","district","`",",","`","country","`",",","`","state","`",",","`","street","`",",","`","housenumber","`",",","or","`","postalcode","`",".",":","type","query",":","str","or","dict",":","param","bbox",":","A","type","of","spatial","filter",",","limits","the","search","for","any","other","attributes","in","the","request",".","Specified","by","two","coordinate","(","lat\/lon",")","pairs","--","corners","of","the","box",".","`","The","bbox","search","is","currently","similar","to","mapview","but","it","is","not","extended","`","(","cited","from","the","REST","API","docs",")",".","Relevant","global","results","are","also","returned",".","Example",":","``","[","Point","(","22",",","180",")",",","Point","(","-22",",","-180",")","]","``",".",":","type","bbox",":","list","or","tuple","of","2","items","of",":","class",":","`","geopy.point.Point","`","or","``","(","latitude",",","longitude",")","``","or","``","``","%","(","latitude",")","s",",","%","(","longitude",")","s","''","``",".",":","param","mapview",":","The","app","'s","viewport",",","given","as","two","coordinate","pairs",",","specified","by","two","lat\/lon","pairs","--","corners","of","the","bounding","box",",","respectively",".","Matches","from","within","the","set","map","view","plus","an","extended","area","are","ranked","highest",".","Relevant","global","results","are","also","returned",".","Example",":","``","[","Point","(","22",",","180",")",",","Point","(","-22",",","-180",")","]","``",".",":","type","mapview",":","list","or","tuple","of","2","items","of",":","class",":","`","geopy.point.Point","`","or","``","(","latitude",",","longitude",")","``","or","``","``","%","(","latitude",")","s",",","%","(","longitude",")","s","''","``",".",":","param","bool","exactly_one",":","Return","one","result","or","a","list","of","results",",","if","available",".",":","param","int","maxresults",":","Defines","the","maximum","number","of","items","in","the","response","structure",".","If","not","provided","and","there","are","multiple","results","the","HERE","API","will","return","10","results","by","default",".","This","will","be","reset","to","one","if","``","exactly_one","``","is","True",".",":","param","int","pageinformation",":","A","key","which","identifies","the","page","to","be","returned","when","the","response","is","separated","into","multiple","pages",".","Only","useful","when","``","maxresults","``","is","also","provided",".",":","param","str","language",":","Affects","the","language","of","the","response",",","must","be","a","RFC","4647","language","code",",","e.g",".","'en-US","'",".",":","param","str","additional_data",":","A","string","with","key-value","pairs","as","described","on","https",":","\/\/developer.here.com\/documentation\/geocoder\/topics\/resource-params-additional.html",".","These","will","be","added","as","one","query","parameter","to","the","URL",".",":","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",":","``","None","``",",",":","class",":","`","geopy.location.Location","`","or","a","list","of","them",",","if","``","exactly_one=False","``","."]
code: def geocode(
      self,
      query,
      *,
      bbox=None,
      mapview=None,
      exactly_one=True,
      maxresults=None,
      pageinformation=None,
      language=None,
      additional_data=False,
      timeout=DEFAULT_SENTINEL,
  ):
      """
      Return a location point by address.
  
      This implementation supports only a subset of all available parameters.
      A list of all parameters of the pure REST API is available here:
      https://developer.here.com/documentation/geocoder/topics/resource-geocode.html
  
      :param query: The address or query you wish to geocode.
  
          For a structured query, provide a dictionary whose keys
          are one of: `city`, `county`, `district`, `country`, `state`,
          `street`, `housenumber`, or `postalcode`.
      :type query: str or dict
  
      :param bbox: A type of spatial filter, limits the search for any other attributes
          in the request. Specified by two coordinate (lat/lon)
          pairs -- corners of the box. `The bbox search is currently similar
          to mapview but it is not extended` (cited from the REST API docs).
          Relevant global results are also returned.
          Example: ``[Point(22, 180), Point(-22, -180)]``.
      :type bbox: list or tuple of 2 items of :class:`geopy.point.Point` or
          ``(latitude, longitude)`` or ``"%(latitude)s, %(longitude)s"``.
  
      :param mapview: The app's viewport, given as two coordinate pairs, specified
          by two lat/lon pairs -- corners of the bounding box,
          respectively. Matches from within the set map view plus an extended area
          are ranked highest. Relevant global results are also returned.
          Example: ``[Point(22, 180), Point(-22, -180)]``.
      :type mapview: list or tuple of 2 items of :class:`geopy.point.Point` or
          ``(latitude, longitude)`` or ``"%(latitude)s, %(longitude)s"``.
  
      :param bool exactly_one: Return one result or a list of results, if
          available.
  
      :param int maxresults: Defines the maximum number of items in the
          response structure. If not provided and there are multiple results
          the HERE API will return 10 results by default. This will be reset
          to one if ``exactly_one`` is True.
  
      :param int pageinformation: A key which identifies the page to be returned
          when the response is separated into multiple pages. Only useful when
          ``maxresults`` is also provided.
  
      :param str language: Affects the language of the response,
          must be a RFC 4647 language code, e.g. 'en-US'.
  
      :param str additional_data: A string with key-value pairs as described on
          https://developer.here.com/documentation/geocoder/topics/resource-params-additional.html.
          These will be added as one query parameter to the URL.
  
      :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: ``None``, :class:`geopy.location.Location` or a list of them, if
          ``exactly_one=False``.
      """
      if isinstance(query, collections.abc.Mapping):
          params = {
              key: val
              for key, val in query.items()
              if key in self.structured_query_params
          }
      else:
          params = {"searchtext": query}
      if bbox:
          params["bbox"] = self._format_bounding_box(
              bbox, "%(lat2)s,%(lon1)s;%(lat1)s,%(lon2)s"
          )
      if mapview:
          params["mapview"] = self._format_bounding_box(
              mapview, "%(lat2)s,%(lon1)s;%(lat1)s,%(lon2)s"
          )
      if pageinformation:
          params["pageinformation"] = pageinformation
      if maxresults:
          params["maxresults"] = maxresults
      if exactly_one:
          params["maxresults"] = 1
      if language:
          params["language"] = language
      if additional_data:
          params["additionaldata"] = additional_data
      if self.apikey:
          params["apiKey"] = self.apikey
      else:
          params["app_id"] = self.app_id
          params["app_code"] = self.app_code
  
      url = "?".join((self.api, urlencode(params)))
      logger.debug("%s.geocode: %s", self.__class__.__name__, url)
      callback = partial(self._parse_json, exactly_one=exactly_one)
      return self._call_geocoder(url, callback, timeout=timeout)
  
imports: import collections.abc
  import json
  import warnings
  from functools import partial
  from urllib.parse import urlencode
  from geopy.adapters import AdapterHTTPError
  from geopy.exc import ConfigurationError, GeocoderAuthenticationFailure, GeocoderInsufficientPrivileges, GeocoderQueryError, GeocoderRateLimited, GeocoderServiceError, GeocoderUnavailable
  from geopy.geocoders.base import DEFAULT_SENTINEL, ERROR_CODE_MAP, Geocoder
  from geopy.location import Location
  from geopy.util import join_filter, logger
label_desc: Use image node_id 2 for calling the Here obj's underlying member method code with example usage: obj.geocode(query) and returns: self