@classmethod
def _fix(cls, data):
    """Convert Python 2.7 syntax to Python 2.4 syntax."""
    output = []
    i, j, ld, special_re = 0, 0, len(data), cls._SPECIAL_RE
    while 1:
        match = special_re.search(data, j)
        if not match:
            output.append(data[i:])
            break
        k = match.start()
        if data[k] == '#':
            j = data.find('\n', j) + 1 or ld
            continue
        if data[k] in ') ':
            output.append(data[i:k])
            if not data[k].isspace():
                output.append(data[k])
            output.append(', ')
            i = j = match.end()
            continue
        if k > 0 and data[k - 1] == 'b':
            output.append(data[i:k - 1])
            i = k
        if k > 1 and data[k - 2] == 'br':
            output.append(data[i:k - 2])
            i = k - 1
        d3 = data[k:k + 3]
        if d3 in ('"""', "'''"):
            qd = d3
        else:
            qd = data[k]
        j = k + 1
        while 1:
            j = data.find(qd, j)
            if j < 0:
                raise SyntaxError('Missing end of string literal.')
            k = j - 1
            while data[k] == '\\':
                k -= 1
            if k - j & 1:
                break
            j += 1
        j += len(qd)
    return ''.join(output)
