code: def test_get_hookimpls(pm):
      class Hooks(object):
          @hookspec
          def he_method1(self, arg):
              pass
  
      pm.add_hookspecs(Hooks)
      assert pm.hook.he_method1.get_hookimpls() == []
  
      class Plugin1(object):
          @hookimpl
          def he_method1(self, arg):
              pass
  
      class Plugin2(object):
          @hookimpl
          def he_method1(self, arg):
              pass
  
      class PluginNo(object):
          pass
  
      plugin1, plugin2, plugin3 = Plugin1(), Plugin2(), PluginNo()
      pm.register(plugin1)
      pm.register(plugin2)
      pm.register(plugin3)
  
      hookimpls = pm.hook.he_method1.get_hookimpls()
      hook_plugins = [item.plugin for item in hookimpls]
      assert hook_plugins == [plugin1, plugin2]
  
imports: import pytest
  import types
  from pluggy import PluginManager, PluginValidationError, HookCallError, HookimplMarker, HookspecMarker
  from pluggy.manager import importlib_metadata
label_desc: Use image node_id 18 for calling a global function with example usage: test_get_hookimpls(pm) without return types