code: def test_register_dynamic_attr(he_pm):
      class A(object):
          def __getattr__(self, name):
              if name[0] != "_":
                  return 42
              raise AttributeError()
  
      a = A()
      he_pm.register(a)
      assert not he_pm.get_hookcallers(a)
  
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 4 for calling a global function with example usage: test_register_dynamic_attr(he_pm) and returns: int