code: def kill_word(event: E) -> None:
      """
      Kill from point to the end of the current word, or if between words, to the
      end of the next word. Word boundaries are the same as forward-word.
      """
      buff = event.current_buffer
      pos = buff.document.find_next_word_ending(count=event.arg)
  
      if pos:
          deleted = buff.delete(count=pos)
  
          if event.is_repeat:
              deleted = event.app.clipboard.get_data().text + deleted
  
          event.app.clipboard.set_text(deleted)
  
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 29 for calling a global function with example usage: kill_word(event) without return types