code: def cursor_in_leading_ws(cli):
      before = (
          cli.application.buffer.document.current_line_before_cursor
      )
      return (not before) or before.isspace()
  
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 1 for calling a global function with example usage: cursor_in_leading_ws(cli) and returns: unknown