https://weshallneversurrender.com/PyMem-SetupDebugHooks/
Unveiling the Magic Behind PyMem_SetupDebugHooks in Python