def geocode_location(location, sensor=False):

    url, geo_response = _fetch_remote_json(
            GooglePlaces.GEOCODE_API_URL,
            {'address': location, 'sensor': str(sensor).lower()})
    _validate_response(url, geo_response)
    if geo_response['status'] == GooglePlaces.RESPONSE_STATUS_ZERO_RESULTS:
        error_detail = ('Lat/Lng for location \'%s\' can\'t be determined.' %
                        location)
        raise GooglePlacesError(error_detail)
    return geo_response['results'][0]['geometry']['location']
Converts a human-readable location to lat-lng.
dataset/ETHPy150Open slimkrazy/python-google-places/googleplaces/__init__.py/geocode_location