code: def test_live_screen() -> None:
      console = create_capture_console(width=20, height=5)
      console.begin_capture()
      with Live(
          Text("foo"), screen=True, console=console, auto_refresh=False
      ) as live:
          live.refresh()
      result = console.end_capture()
      print(repr(result))
      expected = "\x1b[?1049h\x1b[H\x1b[?25l\x1b[Hfoo                 \n                    \n                    \n                    \n                    \x1b[Hfoo                 \n                    \n                    \n                    \n                    \x1b[?25h\x1b[?1049l"
      assert result == expected
  
file_path: rich/tests/test_live.py
imports: import time
  from typing import Optional
  from rich.console import Console
  from rich.live import Live
  from rich.text import Text
label_desc: Use image node_id 11 for calling a global function with example usage: test_live_screen() without return types