code: def test_register_mismatch_method(he_pm: PluginManager) -> None:
      class hello:
          @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 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 7 for calling a global function with example usage: test_register_mismatch_method(he_pm) without return types