code: def test_register_hookwrapper_not_a_generator_function(
      he_pm: PluginManager,
  ) -> None:
      class hello:
          @hookimpl(hookwrapper=True)
          def he_method1(self):
              pass  # pragma: no cover
  
      plugin = hello()
  
      with pytest.raises(
          PluginValidationError, match="generator function"
      ) as excinfo:
          he_pm.register(plugin)
      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 9 for calling a global function with example usage: test_register_hookwrapper_not_a_generator_function(he_pm) without return types