def METHOD_NAME(qtbot, partype, default, condition, kwargs):
    """Test if various input-types are handled correctly for toggling."""
    class TestProcedure(Procedure):
        toggle_par = partype('toggle', default=default, **kwargs)
        x = Parameter('X', default='value', group_by='toggle_par', group_condition=condition)
    wdg = InputsWidget(TestProcedure, inputs=('toggle_par', 'x'))
    qtbot.addWidget(wdg)
    assert wdg.x.isVisibleTo(wdg) is False
    wdg.toggle_par.setValue(condition)
    assert wdg.x.isVisibleTo(wdg) is True
    wdg.toggle_par.setValue(default)
    assert wdg.x.isVisibleTo(wdg) is False