def METHOD_NAME(historylog):
    """
    Test toggle_line_numbers method.
    Toggle the 'Show line numbers' config action.
    """
    hw = historylog.get_widget()
    path = create_file('test.py', 'a = 1')
    hw.add_history(path)
    # Starts without line numbers.
    hw.set_conf('line_numbers', False)
    assert not hw.editors[1].linenumberarea.isVisible()
    assert not hw.get_conf('line_numbers')
    # Toggles line numbers on.
    hw.set_conf('line_numbers', True)
    assert hw.editors[1].linenumberarea.isVisible()
    assert hw.get_conf('line_numbers')
    # Toggles line numbers off.
    hw.set_conf('line_numbers', False)
    assert not hw.editors[1].linenumberarea.isVisible()
    assert not hw.get_conf('line_numbers')