def escape(self, s: str) -> str:
        """
        Used for filter string construction.
        Add backslash character in front of any special character (backslash or double quote)
        in one pass.
        """
        escaped = []
        for char in s:
            if char in CHARACTERS_TO_BE_ESCAPED_IN_VESPA:
                escaped.append('\\' + char)
            else:
                escaped.append(char)
        return ''.join(escaped)

        Used for filter string construction.
        Add backslash character in front of any special character (backslash or double quote)
        in one pass.
        
src/marqo/core/vespa_index/vespa_index.py