code: def test_adding_wrappers_complex(
      hc: _HookCaller, addmeth: AddMeth
  ) -> None:
      assert funcs(hc.get_hookimpls()) == []
  
      @addmeth(hookwrapper=True, trylast=True)
      def m1():
          yield
  
      assert funcs(hc.get_hookimpls()) == [m1]
  
      @addmeth()
      def m2() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [m2, m1]
  
      @addmeth(trylast=True)
      def m3() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [m3, m2, m1]
  
      @addmeth(hookwrapper=True)
      def m4() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [m3, m2, m1, m4]
  
      @addmeth(wrapper=True, tryfirst=True)
      def m5():
          yield
  
      assert funcs(hc.get_hookimpls()) == [m3, m2, m1, m4, m5]
  
      @addmeth(tryfirst=True)
      def m6() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [m3, m2, m6, m1, m4, m5]
  
      @addmeth()
      def m7() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [m3, m2, m7, m6, m1, m4, m5]
  
      @addmeth(wrapper=True)
      def m8():
          yield
  
      assert funcs(hc.get_hookimpls()) == [
          m3,
          m2,
          m7,
          m6,
          m1,
          m4,
          m8,
          m5,
      ]
  
      @addmeth(trylast=True)
      def m9() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [
          m9,
          m3,
          m2,
          m7,
          m6,
          m1,
          m4,
          m8,
          m5,
      ]
  
      @addmeth(tryfirst=True)
      def m10() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [
          m9,
          m3,
          m2,
          m7,
          m6,
          m10,
          m1,
          m4,
          m8,
          m5,
      ]
  
      @addmeth(hookwrapper=True, trylast=True)
      def m11() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [
          m9,
          m3,
          m2,
          m7,
          m6,
          m10,
          m11,
          m1,
          m4,
          m8,
          m5,
      ]
  
      @addmeth(wrapper=True)
      def m12():
          yield
  
      assert funcs(hc.get_hookimpls()) == [
          m9,
          m3,
          m2,
          m7,
          m6,
          m10,
          m11,
          m1,
          m4,
          m8,
          m12,
          m5,
      ]
  
      @addmeth()
      def m13() -> None:
          ...
  
      assert funcs(hc.get_hookimpls()) == [
          m9,
          m3,
          m2,
          m7,
          m13,
          m6,
          m10,
          m11,
          m1,
          m4,
          m8,
          m12,
          m5,
      ]
  
imports: from typing import Callable
  from typing import List
  from typing import Sequence
  from typing import TypeVar
  import pytest
  from pluggy import HookimplMarker
  from pluggy import HookspecMarker
  from pluggy import PluginManager
  from pluggy import PluginValidationError
  from pluggy._hooks import _HookCaller
  from pluggy._hooks import HookImpl
label_desc: Use image node_id 11 for calling a global function with example usage: test_adding_wrappers_complex(hc, addmeth) without return types