code: def test_escape_backslash_end():
      # https://github.com/Textualize/rich/issues/2987
      value = "C:\\"
      assert escape(value) == "C:\\\\"
  
      escaped_tags = f"[red]{escape(value)}[/red]"
      assert escaped_tags == "[red]C:\\\\[/red]"
      escaped_text = Text.from_markup(escaped_tags)
      assert escaped_text.plain == "C:\\"
      assert escaped_text.spans == [Span(0, 3, "red")]
  
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 4 for calling a global function with example usage: test_escape_backslash_end() without return types