code: def test_call_hook(benchmark, plugins, wrappers, nesting):
      pm = PluginManager("example")
  
      class HookSpec:
          @hookspec
          def fun(self, hooks, nesting: int):
              pass
  
      class Plugin:
          def __init__(self, num: int) -> None:
              self.num = num
  
          def __repr__(self) -> str:
              return f"<Plugin {self.num}>"
  
          @hookimpl
          def fun(self, hooks, nesting: int) -> None:
              if nesting:
                  hooks.fun(hooks=hooks, nesting=nesting - 1)
  
      class PluginWrap:
          def __init__(self, num: int) -> None:
              self.num = num
  
          def __repr__(self) -> str:
              return f"<PluginWrap {self.num}>"
  
          @hookimpl(wrapper=True)
          def fun(self):
              return (yield)
  
      pm.add_hookspecs(HookSpec)
  
      for i in range(plugins):
          pm.register(Plugin(i), name=f"plug_{i}")
      for i in range(wrappers):
          pm.register(PluginWrap(i), name=f"wrap_plug_{i}")
  
      benchmark(pm.hook.fun, hooks=pm.hook, nesting=nesting)
  
file_path: catboost/contrib/python/pluggy/py3/tests/benchmark.py
imports: import pytest
  from pluggy import HookimplMarker
  from pluggy import HookspecMarker
  from pluggy import PluginManager
  from pluggy._callers import _multicall
  from pluggy._hooks import HookImpl
label_desc: Use image node_id 6 for calling a global function with example usage: test_call_hook(benchmark, plugins, wrappers, nesting) and returns: str, self, str, str, self, str, unknown