def chunk_iterable(A,n):
    cnt = 0
    chunk = []
    for v in A:
        if cnt<n:
            cnt+=1
            chunk.append(v)
        else:
            yield(chunk)
            cnt = 0
            chunk = []
    if len(chunk)>0:
        yield(chunk)
A variant of the imap() method which returns an ApplyResult
dataset/ETHPy150Open rwalk333/straw/src/kafka_stream_eater/kafka_stream_producer.py/chunk_iterable--crossover with--dataset/ETHPy150Open serverdensity/sd-agent/checks/libs/thread_pool.py/Pool.imap_async