human
I wrote the below code

    def product(*args):
        p = [[]]
        for iterable in args:
            p = [(x + [y]) for x in p for y in iterable]
        for p in p:
            (yield tuple(p))
    s = []
    p = []
    for (k, v) in kwargs.items():
        p.append([(k, v) for v in v])
    for p in product(*p):
        p = dict(p)
        s.append((K_fold_cross_validation(Classifier, documents, folds, **p), p))
    return sorted(s, reverse=True)

What's a good function header?
assistant
#Here's a good function header.

def gridsearch(Classifier, documents=[], folds=10, **kwargs):