code: def _to_text(button: Button) -> str:
      control = to_window(button).content
      return fragment_list_to_text(control.text())
  
imports: from __future__ import annotations
  from prompt_toolkit.formatted_text import fragment_list_to_text
  from prompt_toolkit.layout import to_window
  from prompt_toolkit.widgets import Button
label_desc: Use image node_id 1 for calling a global function with example usage: _to_text(button) and returns: fragment_list_to_text