code: def test_render_escape():
      console = Console(width=80, color_system=None)
      console.begin_capture()
      console.print(
          escape(r"[red]"),
          escape(r"\[red]"),
          escape(r"\\[red]"),
          escape(r"\\\[red]"),
      )
      result = console.end_capture()
      expected = r"[red] \[red] \\[red] \\\[red]" + "\n"
      assert result == expected
  
imports: import pytest
  from rich.console import Console
  from rich.errors import MarkupError
  from rich.markup import RE_TAGS, Tag, _parse, escape, render
  from rich.text import Span, Text
label_desc: Use image node_id 5 for calling a global function with example usage: test_render_escape() without return types