'Find the index of the chunk which contains line.'

def _locate_chunk(self, whichdiffs, sequence, line):

    idx = (1 + (2 * (sequence != 1)))
    line_in_chunk = (lambda x: (line < x[(idx + 1)]))
    i = 0
    for c in self.diffs[whichdiffs]:
        if line_in_chunk(c):
            break
        else:
            i += 1
    return i
