def METHOD_NAME(plugin, activate_later_first):
    plugins.manager.install(plugin, activate=True)
    if activate_later_first:
        plugins.manager.activate_later(plugin)
    plugins.manager.deactivate_later(plugin)
    plugins.manager.activate_pending_plugins()
    assert plugin.get_name() not in plugins.manager.get_active_plugins()
    assert plugin._activate_called
    assert plugin._deactivate_called