You should land up doing something like `doc_list = Parallel(n_jobs=self.n_jobs)(delayed(_count_doc_features)(doc) for doc in raw_documents)` in place of about 30 lines of multiprocessing code here.