def _autocomplete(client, url_part, input_text, offset=None, location=None,
                  radius=None, language=None, type=None, components=None):

    params = {"input": input_text}

    if offset:
        params["offset"] = offset
    if location:
        params["location"] = convert.latlng(location)
    if radius:
        params["radius"] = radius
    if language:
        params["language"] = language
    if type:
        params["type"] = type
    if components:
        params["components"] = convert.components(components)

    url = "/maps/api/place/%sautocomplete/json" % url_part
    return client._get(url, params)["predictions"]
Internal handler for ``autocomplete`` and ``autocomplete_query``.
dataset/ETHPy150Open googlemaps/google-maps-services-python/googlemaps/places.py/_autocomplete