I am using Parallel function from joblib package in Python. I would like to use this function only for handle one of my functions but unfortunately the whole code is running in parallel (apart from other functions).
Example:
from joblib import Parallel, delayed
print ('I do not want this to be printed n times')
def do_something(arg):
some calculations(arg)
Parallel(n_jobs=5)(delayed(do_something)(i) for i in range(0, n))