code: def test_vi_character_delete_before_cursor():
      "Test 'X' keypress."
      feed = partial(
          _feed_cli_with_input,
          editing_mode=EditingMode.VI,
          multiline=True,
      )
  
      # Delete one character.
      result, cli = feed("abcd\x1bX\r")
      assert result.text == "abd"
  
      # Delete multiple character.
      result, cli = feed("hello world\x1b3X\r")
      assert result.text == "hello wd"
  
      # Delete multiple character on multiple lines.
      result, cli = feed("hello\x1boworld\x1bgg$3X\r")
      assert result.text == "ho\nworld"
  
      result, cli = feed("hello\x1boworld\x1b100X\r")
      assert result.text == "hello\nd"
  
      # Delete on empty line.
      result, cli = feed("\x1bo\x1bo\x1b10X\r")
      assert result.text == "\n\n"
  
imports: from __future__ import annotations
  from functools import partial
  import pytest
  from prompt_toolkit.clipboard import ClipboardData, InMemoryClipboard
  from prompt_toolkit.enums import EditingMode
  from prompt_toolkit.filters import ViInsertMode
  from prompt_toolkit.history import InMemoryHistory
  from prompt_toolkit.input.defaults import create_pipe_input
  from prompt_toolkit.input.vt100_parser import ANSI_SEQUENCES
  from prompt_toolkit.key_binding.bindings.named_commands import prefix_meta
  from prompt_toolkit.key_binding.key_bindings import KeyBindings
  from prompt_toolkit.output import DummyOutput
  from prompt_toolkit.shortcuts import PromptSession
label_desc: Use image node_id 32 for calling a global function with example usage: test_vi_character_delete_before_cursor() without return types