def geocode(
            self,
            query,
            exactly_one=True,
            user_location=None,
            timeout=None,
            culture=None,
            include_neighborhood=None,
            include_country_code=False
        ):  # pylint: disable=W0221
        if isinstance(query, dict):
            params = {
                key: val
                for key, val
                in query.items()
                if key in self.structured_query_params
            }
            params['key'] = self.api_key
        else:
            params = {
                'query': self.format_string % query,
                'key': self.api_key
            }
        if user_location:
            params['userLocation'] = ",".join(
                (str(user_location.latitude), str(user_location.longitude))
            )
        if exactly_one is True:
            params['maxResults'] = 1
        if culture:
            params['culture'] = culture
        if include_neighborhood is not None:
            params['includeNeighborhood'] = include_neighborhood
        if include_country_code:
            params['include'] = 'ciso2'  # the only acceptable value

        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
        )
Geocode an address.
dataset/ETHPy150Open geopy/geopy/geopy/geocoders/bing.py/Bing.geocode