code: def test_hookwrapper_exception(exc: "Type[BaseException]") -> None:
      out = []
  
      @hookimpl(hookwrapper=True)
      def m1():
          out.append("m1 init")
          result = yield
          assert isinstance(result.exception, exc)
          assert result.excinfo[0] == exc
          out.append("m1 finish")
  
      @hookimpl
      def m2():
          raise exc
  
      with pytest.raises(exc):
          MC([m2, m1], {})
      assert out == ["m1 init", "m1 finish"]
  
imports: from typing import Callable
  from typing import List
  from typing import Mapping
  from typing import Sequence
  from typing import Type
  from typing import Union
  import pytest
  from pluggy import HookCallError
  from pluggy import HookimplMarker
  from pluggy import HookspecMarker
  from pluggy._callers import _multicall
  from pluggy._hooks import HookImpl
label_desc: Use image node_id 16 for calling a global function with example usage: test_hookwrapper_exception(exc) without return types