I accidentally discovered a very nasty solution. It works, as long as you
use a def statement. If you declare the function, that you want to use in Pool.map with the global keyword at the beginning of the function that solves it. But I would not rely on this in serious applications