C-api to check whether the current thread has acquired the GIL or not (PyGILState_Check) for python 2