@staticmethod
def _escape_value(value) ->str:
    """
        Formats and replaces backslashes and single quoted parenthesis
        :param value: str
        :return: str
        """
    if isinstance(value, str):
        return '{}'.format(value.replace('\\', '\\\\').replace('"', '\\"').
            replace('(', '\\(').replace(')', '\\)'))
    else:
        return value
