code: def test_rich_pretty() -> None:
      console = Console()
      with console.capture() as capture:
          console.print(Foo("hello", bar=3))
      result = capture.get()
      expected = "Foo('hello', 'hello', bar=3, egg=1)\n"
      assert result == expected
  
imports: import sys
  from typing import Optional
  import pytest
  import rich.repr
  from rich.console import Console
  from inspect import Parameter
label_desc: Use image node_id 7 for calling a global function with example usage: test_rich_pretty() without return types