def METHOD_NAME(hook_name, suite, checkpoint):
    @gossip.register('slash.{}'.format(hook_name))
    def hook(*_, **__):
        raise KeyboardInterrupt()
    @gossip.register('slash.session_interrupt')
    def interrupt(*_, **__):
        checkpoint()
    if 'session_start' in hook_name:
        for test in suite:
            test.expect_deselect()
    else:
        assert hook_name == 'before_session_cleanup'
        suite[-1].expect_interruption()
    results = suite.run(expect_interruption=True)
    assert results.session.results.global_result.is_interrupted()
    assert checkpoint.called