gh-140544: use faster _PyInterpreterState_GET for type lock
#140584
Merged
_PyInterpreterState_GET for type lock
#140584