Python helpers to limit the number of threads used in native libraries that handle their own internal threadpool (BLAS and OpenMP implementations).