def autocomplete(self, input, lat_lng=None, location=None, radius=<NUM_LIT>,<EOL>language=lang.ENGLISH, types=None, components=[]):
self._request_params = {'<STR_LIT:input>': input}<EOL>if lat_lng is not None or location is not None:<EOL><INDENT>lat_lng_str = self._generate_lat_lng_string(lat_lng, location)<EOL>self._request_params['<STR_LIT:location>'] = lat_lng_str<EOL><DEDENT>self._request_params['<STR_LIT>'] = radius<EOL>if types:<EOL><INDENT>self._request_params['<STR_LIT>'] = types<EOL><DEDENT>if len(components) > <NUM_LIT:0>:<EOL><INDENT>self._request_params['<STR_LIT>'] = '<STR_LIT:|>'.join(['<STR_LIT>'.format(<EOL>c[<NUM_LIT:0>],c[<NUM_LIT:1>]) for c in components])<EOL><DEDENT>if language is not None:<EOL><INDENT>self._request_params['<STR_LIT>'] = language<EOL><DEDENT>self._add_required_param_keys()<EOL>url, places_response = _fetch_remote_json(<EOL>GooglePlaces.AUTOCOMPLETE_API_URL, self._request_params)<EOL>_validate_response(url, places_response)<EOL>return GoogleAutocompleteSearchResult(self, places_response)<EOL>
Perform an autocomplete search using the Google Places API.

Only the input kwarg is required, the rest of the keyword arguments
are optional.

keyword arguments:
input    -- The text string on which to search, for example:
            "Hattie B's".
lat_lng  -- A dict containing the following keys: lat, lng
            (default None)
location -- A human readable location, e.g 'London, England'
            (default None)
radius   -- The radius (in meters) around the location to which the
            search is to be restricted. The maximum is 50000 meters.
            (default 3200)
language -- The language code, indicating in which language the
            results should be returned, if possible. (default lang.ENGLISH)
types    -- A type to search against. See `types.py` "autocomplete types"
            for complete list
            https://developers.google.com/places/documentation/autocomplete#place_types.
components -- An optional grouping of places to which you would
            like to restrict your results. An array containing one or
            more tuples of:
            * country: matches a country name or a two letter ISO 3166-1 country code.
            eg: [('country','US')]