code: def test_rich_print_X():
      console = rich.get_console()
      output = io.StringIO()
      backup_file = console.file
      try:
          console.file = output
          rich.print("foo")
          rich.print("fooX")
          rich.print("fooXX")
          assert output.getvalue() == "foo\nfooX\nfooXX\n"
      finally:
          console.file = backup_file
  
file_path: rich/tests/test_rich_print.py
imports: import io
  import json
  import rich
  from rich.console import Console
label_desc: Use image node_id 7 for calling a global function with example usage: test_rich_print_X() without return types