'Transform multiline statements into single lines.
@param lines: lines to work on
@type lines: iterable of L{bytes}
@return: iterable of continuous lines'

def collapseContinuations(self, lines):

    l = []
    state = 0
    for line in lines:
        if (state == 0):
            if (line.find('(') == (-1)):
                l.append(line)
            else:
                l.append(line[:line.find('(')])
                state = 1
        elif (line.find(')') != (-1)):
            l[(-1)] += ('    ' + line[:line.find(')')])
            state = 0
        else:
            l[(-1)] += ('    ' + line)
    return filter(None, (line.split() for line in l))
