add function definition for _pyTriSum