https://weshallneversurrender.com/PyMem-Realloc/
Understanding PyMem_Realloc: A Comprehensive Guide for Python Beginners