def google_average(search_term, num_results, api_key, cse_id, **kwargs):
    """Does a Google image search to get the average color of the
    top x results.
    Arguments
    search_term: str
        tearm to search for
    num_results: int
        number of results to average
    api_key: str
        Google API key
    cse_id: str
        Google CSE ID
    max_threads: int
        max number of processes to spawn

    return {'name':search_term, 'red':r_avg, 'green':g_avg, 'blue':b_avg}
    or None
    """
    url_list = []
    result = {'name': search_term}
    GIS = GoogleImageSearch(api_key, cse_id)
    url_list = GIS.search(search_term, num_results)
    result.update(_image_search_average(url_list, **kwargs))
    return(result)
def google_average ( search_term , num_results , api_key , cse_id , ** kwargs ) : url_list = [ ] result = { 'name' : search_term } GIS = GoogleImageSearch ( api_key , cse_id ) url_list = GIS . search ( search_term , num_results ) result . update ( _image_search_average ( url_list , ** kwargs ) ) return ( result )
Does a Google image search to get the average color of the
    top x results.
    Arguments
    search_term: str
        tearm to search for
    num_results: int
        number of results to average
    api_key: str
        Google API key
    cse_id: str
        Google CSE ID
    max_threads: int
        max number of processes to spawn

    return {'name':search_term, 'red':r_avg, 'green':g_avg, 'blue':b_avg}
    or None