from joblib import Memory, Parallel, delayed