LibreOffice writer multiprocessing or ProcessPoolExecutor

I am writing a macro in python for LO.
I have processes that take a little while to run that are cpu intensive. I thought a good candidate for multiprocessing. I spend a few days refactoring the code to get it ready.

No luck. I can not event get this process to start. I then tested the simplest multiprocess and I get the same error.

Sample code that does not run in LibreOffice Writer

def do_something(seconds):
    print(f"sleeping {seconds} second(s)")
    time.sleep(seconds)
    return f"Done sleeping...{seconds}"

def do_cf():
    with cf.ProcessPoolExecutor() as executor:
        secs = [5, 4, 3, 2, 1]
        results = executor.map(do_something, secs)
        for result in results:
            print(result)

I am using LibreOffice 7.1.4.2 installed via snap
Is it possible to use multiprocessing/parallelism in LibreOffice?