code: def scroll_page_up(event: E) -> None:
      """
      Scroll page up. (Prefer the cursor at the bottom of the page, after scrolling.)
      """
      w = event.app.layout.current_window
      b = event.app.current_buffer
  
      if w and w.render_info:
          # Put cursor at the first visible line. (But make sure that the cursor
          # moves at least one line up.)
          line_index = max(
              0,
              min(
                  w.render_info.first_visible_line(),
                  b.document.cursor_position_row - 1,
              ),
          )
  
          b.cursor_position = b.document.translate_row_col_to_index(
              line_index, 0
          )
          b.cursor_position += b.document.get_start_of_line_position(
              after_whitespace=True
          )
  
          # Set the scroll offset. We can safely set it to zero; the Window will
          # make sure that it scrolls at least until the cursor becomes visible.
          w.vertical_scroll = 0
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/bindings/scroll.py
imports: from __future__ import annotations
  from prompt_toolkit.key_binding.key_processor import KeyPressEvent
label_desc: Use image node_id 8 for calling a global function with example usage: scroll_page_up(event) without return types