Example of Py_BEGIN_ALLOW_THREADS and threading for multi-core processing.