def is_escaped(value, index):
    """Returns True if the character at index is escaped with a \\ """
    cur = index - 1
    if cur < 0:
        return False
    while value[cur] == '\\':
        cur -= 1
        if cur < 0:
            break
    return (index - cur - 1) % 2
