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