code: def test_refresh_screen():
      layout = Layout()
      layout.split_row(Layout(name="foo"), Layout(name="bar"))
      console = Console(
          force_terminal=True, width=20, height=5, _environ={}
      )
      with console.capture():
          console.print(layout)
      with console.screen():
          with console.capture() as capture:
              layout.refresh_screen(console, "foo")
      result = capture.get()
      print()
      print(repr(result))
      expected = "\x1b[1;1H\x1b[34m╭─\x1b[0m\x1b[34m \x1b[0m\x1b[32m'foo'\x1b[0m\x1b[34m─╮\x1b[0m\x1b[2;1H\x1b[34m│\x1b[0m \x1b[1;35mLayout\x1b[0m \x1b[34m│\x1b[0m\x1b[3;1H\x1b[34m│\x1b[0m \x1b[1m(\x1b[0m      \x1b[34m│\x1b[0m\x1b[4;1H\x1b[34m│\x1b[0m     \x1b[33mna\x1b[0m \x1b[34m│\x1b[0m\x1b[5;1H\x1b[34m╰────────╯\x1b[0m"
      assert result == expected
  
file_path: rich/tests/test_layout.py
imports: import sys
  import pytest
  from rich.console import Console
  from rich.layout import Layout, NoSplitter
  from rich.panel import Panel
label_desc: Use image node_id 6 for calling a global function with example usage: test_refresh_screen() without return types