code: def test_register_mismatch_method(he_pm):
      class hello(object):
          @hookimpl
          def he_method_notexists(self):
              pass
  
      plugin = hello()
  
      he_pm.register(plugin)
      with pytest.raises(PluginValidationError) as excinfo:
          he_pm.check_pending()
      assert excinfo.value.plugin is plugin
  
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 7 for calling a global function with example usage: test_register_mismatch_method(he_pm) without return types