code: def addmeth(hc):
      def addmeth(tryfirst=False, trylast=False, hookwrapper=False):
          def wrap(func):
              hookimpl(
                  tryfirst=tryfirst,
                  trylast=trylast,
                  hookwrapper=hookwrapper,
              )(func)
              hc._add_hookimpl(
                  HookImpl(None, "<temp>", func, func.example_impl)
              )
              return func
  
          return wrap
  
      return addmeth
  
file_path: catboost/contrib/python/pluggy/py2/tests/test_hookcaller.py
imports: import pytest
  from pluggy import HookimplMarker, HookspecMarker
  from pluggy.hooks import HookImpl
label_desc: Use image node_id 2 for calling a global function with example usage: addmeth(hc) and returns: addmeth, wrap, func