@aaugustin could you review this function? Berker and I want to make sure the usage of `six.reraise` is correct