def geocode(
            self,
            query,
            exactly_one=True,
            timeout=None
        ):
        params = {
            'ak': self.api_key,
            'output': 'json',
            'address': self.format_string % query,
        }

        url = "?".join((self.api, urlencode(params)))
        logger.debug("%s.geocode: %s", self.__class__.__name__, url)
        return self._parse_json(
            self._call_geocoder(url, timeout=timeout), exactly_one=exactly_one
        )
Geocode a location query.
dataset/ETHPy150Open geopy/geopy/geopy/geocoders/baidu.py/Baidu.geocode