code: def test_hookrelay_registry(pm):
      """Verify hook caller instances are registered by name onto the relay
      and can be likewise unregistered."""
  
      class Api(object):
          @hookspec
          def hello(self, arg):
              "api hook 1"
  
      pm.add_hookspecs(Api)
      hook = pm.hook
      assert hasattr(hook, "hello")
      assert repr(hook.hello).find("hello") != -1
  
      class Plugin(object):
          @hookimpl
          def hello(self, arg):
              return arg + 1
  
      plugin = Plugin()
      pm.register(plugin)
      out = hook.hello(arg=3)
      assert out == [4]
      assert not hasattr(hook, "world")
      pm.unregister(plugin)
      assert hook.hello(arg=3) == []
  
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 13 for calling a global function with example usage: test_hookrelay_registry(pm) and returns: unknown