code: def geocode(
              self,
              query,
              exactly_one=True,
              timeout=DEFAULT_SENTINEL,
              limit=None,
              typeahead=False,
              language=None,
      ):
          
          query = self.format_string % query
          params = self._geocode_params(query)
          params['typeahead'] = self._boolean_value(typeahead)
  
          if limit:
              params['limit'] = str(int(limit))
          if exactly_one:
              params['limit'] = '1'
  
          if language:
              params['language'] = language
  
          quoted_query = quote(query.encode('utf-8'))
          url = "?".join((self.api % dict(query=quoted_query),
                          urlencode(params)))
          logger.debug("%s.geocode: %s", self.__class__.__name__, url)
  
          return self._parse_json(
              self._call_geocoder(url, timeout=timeout), exactly_one
          )
docs: Return a location point by address.
  
          :param str query: The address or query you wish to geocode.
  
          :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 int limit: Maximum amount of results to return from the service.
              Unless exactly_one is set to False, limit will always be 1.
  
          :param bool typeahead: If the "typeahead" flag is set, the query
              will be interpreted as a partial input and the search will
              enter predictive mode.
  
          :param str language: Language in which search results should be
              returned. When data in specified language is not
              available for a specific field, default language is used.
              List of supported languages (case-insensitive):
              https://developer.tomtom.com/online-search/online-search-documentation/supported-languages
  
          :rtype: ``None``, :class:`geopy.location.Location` or a list of them, if
              ``exactly_one=False``.