def read_chunks(self, iterator, chunk_size=10, limit=None):
        """Returns a list of next ``chunk_size`` elements, up to ``limit``
        total from given ``iterator``.
        """
        items = list()
        for i, crawl_id in enumerate(iterator, start=1):
            if limit and i > limit:
                break
            items.append(crawl_id)
            if len(items) == chunk_size:
                yield items
                items = list()
        if items:
            yield items
dataset/ETHPy150Open ipeirotis/Mturk-Tracker/app/mturk/updaters/management/commands/remove_bad_crawl_related.py/Command.read_chunks/original