code: def test_subset_hook_caller(pm):
      class Hooks(object):
          @hookspec
          def he_method1(self, arg):
              pass
  
      pm.add_hookspecs(Hooks)
  
      out = []
  
      class Plugin1(object):
          @hookimpl
          def he_method1(self, arg):
              out.append(arg)
  
      class Plugin2(object):
          @hookimpl
          def he_method1(self, arg):
              out.append(arg * 10)
  
      class PluginNo(object):
          pass
  
      plugin1, plugin2, plugin3 = Plugin1(), Plugin2(), PluginNo()
      pm.register(plugin1)
      pm.register(plugin2)
      pm.register(plugin3)
      pm.hook.he_method1(arg=1)
      assert out == [10, 1]
      out[:] = []
  
      hc = pm.subset_hook_caller("he_method1", [plugin1])
      hc(arg=2)
      assert out == [20]
      out[:] = []
  
      hc = pm.subset_hook_caller("he_method1", [plugin2])
      hc(arg=2)
      assert out == [2]
      out[:] = []
  
      pm.unregister(plugin1)
      hc(arg=2)
      assert out == []
      out[:] = []
  
      pm.hook.he_method1(arg=1)
      assert out == [10]
  
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 17 for calling a global function with example usage: test_subset_hook_caller(pm) without return types