def METHOD_NAME(pm: PluginManager) -> None:
    class Api:
        @hookspec(firstresult=True)
        def hello(self, arg):
            "api hook 1"
    pm.add_hookspecs(Api)
    class Plugin1:
        @hookimpl
        def hello(self, arg):
            return arg + 1
    class Plugin2:
        @hookimpl
        def hello(self, arg):
            return arg - 1
    class Plugin3:
        @hookimpl
        def hello(self, arg):
            return None
    class Plugin4:
        @hookimpl(wrapper=True)
        def hello(self, arg):
            assert arg == 3
            outcome = yield
            assert outcome == 2
            return outcome
    class Plugin5:
        @hookimpl(hookwrapper=True)
        def hello(self, arg):
            assert arg == 3
            outcome = yield
            assert outcome.get_result() == 2
    pm.register(Plugin1())  # discarded - not the last registered plugin
    pm.register(Plugin2())  # used as result
    pm.register(Plugin3())  # None result is ignored
    pm.register(Plugin4())  # wrapper should get same non-list result
    pm.register(Plugin5())  # hookwrapper should get same non-list result
    res = pm.hook.hello(arg=3)
    assert res == 2