def parallel_bulk(client, actions, thread_count=4, chunk_size=500,
        max_chunk_bytes=100 * 1024 * 1024,
        expand_action_callback=expand_action, **kwargs):
    # Avoid importing multiprocessing unless parallel_bulk is used
    # to avoid exceptions on restricted environments like App Engine
    from multiprocessing.dummy import Pool
    actions = map(expand_action_callback, actions)

    pool = Pool(thread_count)

    try:
        for result in pool.imap(
            lambda chunk: list(_process_bulk_chunk(client, chunk, **kwargs)),
            _chunk_actions(actions, chunk_size, max_chunk_bytes, client.transport.serializer)
            ):
            for item in result:
                yield item

    finally:
        pool.close()
        pool.join()
Convenience method for getting the full module path
dataset/ETHPy150Open elastic/elasticsearch-py/elasticsearch/helpers/__init__.py/parallel_bulk--crossover with--dataset/ETHPy150Open NervanaSystems/neon/neon/__init__.py/NervanaObject.modulenm