def with_process_pool_executor(): with ProcessPoolExecutor(10) as executor: return list(executor.map(is_prime, PRIMES))