switch python batch to multiprocessing module