[SATYR PATCH 7/8] python: factor out stacktrace object creation