Hi @Micaela ,
Thanks for posting this query in Q&A forum.
Instead of trying parallelization in the code, you can make use of the inbuilt functionality of running the function in more threads. By adding the app setting PYTHON_THREADPOOL_THREAD_COUNT to a value between 2 and 32, you can achieve parallelization.
Hope this helps!
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.