def METHOD_NAME(self, value: str) -> str:
    """
    Escape punctuation within an input string. Taken from RedisOM Python.
    Args:
        value (str): The input string.
    Returns:
        str: The escaped string.
    """
    escaped_chars_re = re.compile(Redis.DEFAULT_ESCAPED_CHARS)
    def escape_symbol(match: re.Match) -> str:
        return f"\\{match.group(0)}"
    return escaped_chars_re.sub(escape_symbol, value