def folds(documents=[], K=10, **kwargs):
    def chunks(iterable, n=10):
        # Returns an iterator of n lists of roughly equal size.
        # http://www.garyrobinson.net/2008/04/splitting-a-pyt.html
        a = list(iterable)
        i = 0
        j = 0
        for m in xrange(n):
            j = i + len(a[m::n])
            yield a[i:j]
            i = j
    k = kwargs.get("k", K)
    d = list(chunks(documents, max(k, 2)))
    for holdout in xrange(k):
        yield list(chain(*(d[:holdout] + d[holdout+1:]))), d[holdout]
By default, actions which require objects in a darkened room should
dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/folds--crossover with--dataset/ETHPy150Open twisted/imaginary/imaginary/test/test_illumination.py/ActionsInDarkRoomTestCase.test_actionWithTargetInDarkRoom