def METHOD_NAME(console, message, transient, output, capsys):
    """If the wait bar is interrupted, output is present or absent based on presence of
    message and transient value."""
    with pytest.raises(KeyboardInterrupt):
        with console.wait_bar(message, transient=transient):
            raise KeyboardInterrupt
    assert capsys.readouterr().out == output