'Return the source line number of a line number in the
generated bytecode as they are not in sync.'

def get_corresponding_lineno(self, lineno):

    for (template_line, code_line) in reversed(self.debug_info):
        if (code_line <= lineno):
            return template_line
    return 1
