code: def test_rich_cast_container():
      foo = Foo()
      console = Console(file=io.StringIO(), legacy_windows=False)
      console.print(Panel.fit(foo, padding=0))
      assert console.file.getvalue() == "╭───╮\n│Foo│\n╰───╯\n"
  
file_path: rich/tests/test_protocol.py
imports: import io
  from rich.abc import RichRenderable
  from rich.console import Console
  from rich.panel import Panel
  from rich.text import Text
label_desc: Use image node_id 3 for calling a global function with example usage: test_rich_cast_container() without return types