code: def pathos_wrapper(process_func, search_processes_paras, n_processes):
      import pathos.multiprocessing as pmp
  
      pool = pmp.Pool(
          n_processes,
          initializer=tqdm.set_lock,
          initargs=(tqdm.get_lock(),),
      )
      results = pool.map(process_func, search_processes_paras)
  
      return results
  
imports: from tqdm import tqdm
label_desc: Use image node_id 3 for calling a global function with example usage: pathos_wrapper(process_func, search_processes_paras, n_processes) and returns: results