code: def hc(pm):
      class Hooks(object):
          @hookspec
          def he_method1(self, arg):
              pass
  
      pm.add_hookspecs(Hooks)
      return pm.hook.he_method1
  
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 1 for calling a global function with example usage: hc(pm) and returns: pm