For example I create a process pool before defining the function to be submitted, and assuming this is on linux:
import multiprocessing as mp pool = mp.Pool() d