code: def test_prompt_confirm_default():
      INPUT = "foo\nNO\ny"
      console = Console(file=io.StringIO())
      answer = Confirm.ask(
          "continue",
          console=console,
          stream=io.StringIO(INPUT),
          default=True,
      )
      assert answer is True
      expected = "continue [y/n] (y): Please enter Y or N\ncontinue [y/n] (y): Please enter Y or N\ncontinue [y/n] (y): "
      output = console.file.getvalue()
      print(repr(output))
      assert output == expected
  
file_path: rich/tests/test_prompt.py
imports: import io
  from rich.console import Console
  from rich.prompt import Prompt, IntPrompt, Confirm
label_desc: Use image node_id 6 for calling a global function with example usage: test_prompt_confirm_default() without return types