def queryset_iterator(queryset, chunksize=1000):
    try:
        pk = 0
        last_pk = queryset.order_by('-pk')[0].pk
        queryset = queryset.order_by('pk')
        while pk < last_pk:
            for row in queryset.filter(pk__gt=pk)[:chunksize]:
                pk = row.pk
                yield row
            gc.collect()
    except IndexError:
        return
    except Exception:
        print_exc()
        return
Returns true if all the paths have the same leading path name
dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/docutil/commands_util.py/queryset_iterator--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/utils/archive.py/BaseArchive.has_leading_dir