def pimap(iterable, function, *args, **kwargs):
    from multiprocessing import Pool
    global worker
    def worker(x):
        return function(x, *args, **kwargs)
    return Pool(processes=None).imap(worker, iterable)

#--- READ-ONLY DICTIONARY --------------------------------------------------------------------------
Returns an iterator of function(x, *args, **kwargs) for the iterable (x1, x2, x3, ...).
dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/pimap