code: def test_thrown_exceptions_preserve_stacktrace():
      def throws(v):
          assert False
  
      def after_throws(v):
          pass
  
      p3 = Promise.resolve("a").then(throws).then(after_throws)
      with raises(AssertionError) as assert_exc:
          p3.get()
  
      assert assert_exc.traceback[-1].path.strpath == __file__
  
imports: from time import sleep
  from pytest import raises, fixture
  from threading import Event
  from promise import Promise, is_thenable, promisify, promise_for_dict
  from concurrent.futures import Future
  from threading import Thread
  from .utils import assert_exception
label_desc: Use image node_id 8 for calling a global function with example usage: test_thrown_exceptions_preserve_stacktrace() without return types