def METHOD_NAME(test_plugin_widgets, make_napari_viewer):
    """Test that we can create magicgui widgets, and they get the viewer."""
    import magicgui
    viewer = make_napari_viewer()
    # only take the plugin actions
    actions = viewer.window.plugins_menu.actions()
    actions = dropwhile(lambda a: a.text() != '', actions)
    # trigger the 'TestP3: magic' action
    tp3 = next(m for m in actions if m.text().endswith('(TestP3)'))
    tp3.trigger()
    # make sure that a dock widget was created
    assert 'magic (TestP3)' in viewer.window._dock_widgets
    dw = viewer.window._dock_widgets['magic (TestP3)']
    # make sure that it contains a magicgui widget
    magic_widget = dw.widget()._magic_widget
    FGui = getattr(magicgui.widgets, 'FunctionGui', None)
    if FGui is None:
        # pre magicgui 0.2.6
        FGui = magicgui.FunctionGui
    assert isinstance(magic_widget, FGui)
    # This magicgui widget uses the parameter annotation to receive a viewer
    assert isinstance(magic_widget.viewer.value, napari.Viewer)
    # The function just returns the viewer... make sure we can call it
    assert isinstance(magic_widget(), napari.Viewer)
    # Add twice is ok, only does a show
    tp3.trigger()