code: def unix_word_rubout(event: E, WORD: bool = True) -> None:
      """
      Kill the word behind point, using whitespace as a word boundary.
      Usually bound to ControlW.
      """
      buff = event.current_buffer
      pos = buff.document.find_start_of_previous_word(
          count=event.arg, WORD=WORD
      )
  
      if pos is None:
          # Nothing found? delete until the start of the document.  (The
          # input starts with whitespace and no words were found before the
          # cursor.)
          pos = -buff.cursor_position
  
      if pos:
          deleted = buff.delete_before_cursor(count=-pos)
  
          # If the previous key press was also Control-W, concatenate deleted
          # text.
          if event.is_repeat:
              deleted += event.app.clipboard.get_data().text
  
          event.app.clipboard.set_text(deleted)
      else:
          # Nothing to delete. Bell.
          event.app.output.bell()
  
imports: from __future__ import annotations
  from typing import Callable, TypeVar, Union, cast
  from prompt_toolkit.document import Document
  from prompt_toolkit.enums import EditingMode
  from prompt_toolkit.key_binding.key_bindings import Binding, key_binding
  from prompt_toolkit.key_binding.key_processor import KeyPress, KeyPressEvent
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.layout.controls import BufferControl
  from prompt_toolkit.search import SearchDirection
  from prompt_toolkit.selection import PasteMode
  from .completion import display_completions_like_readline, generate_completions
label_desc: Use image node_id 30 for calling a global function with example usage: unix_word_rubout(event, WORD) without return types