def _last_iterable(iterable):
    i = iter(iterable)
    v = i.next()
    for nextv in i:
        yield False, v
        v = nextv
    yield True, v
helper for detecting last iteration in for-loop
dataset/ETHPy150Open edgewall/trac/tracopt/versioncontrol/git/git_fs.py/_last_iterable