code: def next_history_or_next_completion(event):
      """
      Control-N in vi edit mode on readline is history previous, unlike default prompt toolkit.
  
      If completer is open this still select next completion.
      """
      event.current_buffer.auto_down()
  
imports: import signal
  import sys
  from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
  from prompt_toolkit.filters import HasFocus, HasSelection, Condition, ViInsertMode, EmacsInsertMode, HasCompletions
  from prompt_toolkit.filters.cli import ViMode
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.key_binding.bindings.completion import display_completions_like_readline
  from IPython.utils.decorators import undoc
label_desc: Use image node_id 5 for calling a global function with example usage: next_history_or_next_completion(event) without return types