code: def test_get_hookcallers(pm: PluginManager) -> None:
      class Hooks:
          @hookspec
          def he_method1(self):
              ...
  
          @hookspec
          def he_method2(self):
              ...
  
      pm.add_hookspecs(Hooks)
  
      class Plugin1:
          @hookimpl
          def he_method1(self):
              ...
  
          @hookimpl
          def he_method2(self):
              ...
  
      class Plugin2:
          @hookimpl
          def he_method1(self):
              ...
  
      class Plugin3:
          @hookimpl
          def he_method2(self):
              ...
  
      plugin1 = Plugin1()
      pm.register(plugin1)
      plugin2 = Plugin2()
      pm.register(plugin2)
      plugin3 = Plugin3()
      pm.register(plugin3)
  
      hookcallers1 = pm.get_hookcallers(plugin1)
      assert hookcallers1 is not None
      assert len(hookcallers1) == 2
      hookcallers2 = pm.get_hookcallers(plugin2)
      assert hookcallers2 is not None
      assert len(hookcallers2) == 1
      hookcallers3 = pm.get_hookcallers(plugin3)
      assert hookcallers3 is not None
      assert len(hookcallers3) == 1
      assert hookcallers1 == hookcallers2 + hookcallers3
  
      assert pm.get_hookcallers(object()) is None
  
imports: import sys
  from typing import Any
  from typing import List
  import pytest
  from pluggy import HookCallError
  from pluggy import HookimplMarker
  from pluggy import HookspecMarker
  from pluggy import PluginManager
  from pluggy import PluginValidationError
label_desc: Use image node_id 23 for calling a global function with example usage: test_get_hookcallers(pm) without return types