code: def test_hookspec(pm: PluginManager) -> None:
      class HookSpec:
          @hookspec()
          def he_myhook1(arg1) -> None:
              pass
  
          @hookspec(firstresult=True)
          def he_myhook2(arg1) -> None:
              pass
  
          @hookspec(firstresult=False)
          def he_myhook3(arg1) -> None:
              pass
  
      pm.add_hookspecs(HookSpec)
      assert pm.hook.he_myhook1.spec is not None
      assert not pm.hook.he_myhook1.spec.opts["firstresult"]
      assert pm.hook.he_myhook2.spec is not None
      assert pm.hook.he_myhook2.spec.opts["firstresult"]
      assert pm.hook.he_myhook3.spec is not None
      assert not pm.hook.he_myhook3.spec.opts["firstresult"]
  
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 12 for calling a global function with example usage: test_hookspec(pm) without return types