Some info for the Python side: https://stackoverflow.com/questions/51030659/modifying-or-reraising-python-error-in-c-api