def sort(words, context="<STR_LIT>", strict=True, relative=True, service=GOOGLE_SEARCH,<EOL>wait=<NUM_LIT:10>, asynchronous=False, cached=False):
results = []<EOL>for word in words:<EOL><INDENT>q = word + "<STR_LIT:U+0020>" + context<EOL>q.strip()<EOL>if strict: q = "<STR_LIT>"+q+"<STR_LIT>"<EOL>r = GoogleSearch(q, <NUM_LIT:1>, service, "<STR_LIT>", wait, asynchronous, cached)<EOL>results.append(r)<EOL><DEDENT>results.sort(GoogleResults.__cmp__)<EOL>results.reverse()<EOL>if relative and len(results) > <NUM_LIT:0>:<EOL><INDENT>sum = <NUM_LIT><EOL>for r in results: sum += r.total<EOL>for r in results: r.total /= float(sum)<EOL><DEDENT>results = [(r.query, r.total) for r in results]<EOL>return results<EOL>
Performs a Google sort on the given list.

    Sorts the items in the list according to 
    the result count Google yields on an item.

    Setting a context sorts the items according
    to their relation to this context;
    for example sorting [red, green, blue] by "love"
    yields red as the highest results,
    likely because red is the color commonly associated with love.