def _escape_markdown_special_characters(string_to_escape: str) -> str:
    """Escapes the special characters used for Markdown formatting in a provided string.

    Args:
        string_to_escape: The string that needs to have Markdown special characters escaped.

    Returns:
        A string with the special characters used for Markdown formatting escaped.
    """
    for character in r"\`*_{}[]()#+-.!":
        string_to_escape = string_to_escape.replace(character, f"\\{character}")
    return string_to_escape