def find_inspectable_lines(lines, pos):
cnt = re.compile(r'<STR_LIT>')<EOL>df = re.compile(r'<STR_LIT>')<EOL>ind = re.compile(r'<STR_LIT>')<EOL>toinspect = []<EOL>home = lines[pos]<EOL>home_indent = ind.match(home).groups()[<NUM_LIT:0>]<EOL>before = lines[max(pos-<NUM_LIT:3>, <NUM_LIT:0>):pos]<EOL>before.reverse()<EOL>after = lines[pos+<NUM_LIT:1>:min(pos+<NUM_LIT:4>, len(lines))]<EOL>for line in before:<EOL><INDENT>if ind.match(line).groups()[<NUM_LIT:0>] == home_indent:<EOL><INDENT>toinspect.append(line)<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>toinspect.reverse()<EOL>toinspect.append(home)<EOL>home_pos = len(toinspect)-<NUM_LIT:1><EOL>continued = cnt.search(home)<EOL>for line in after:<EOL><INDENT>if ((continued or ind.match(line).groups()[<NUM_LIT:0>] == home_indent)<EOL>and not df.search(line)):<EOL><INDENT>toinspect.append(line)<EOL>continued = cnt.search(line)<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>log.debug("<STR_LIT>", toinspect, home_pos)<EOL>return toinspect, home_pos<EOL>
Find lines in home that are inspectable.

    Walk back from the err line up to 3 lines, but don't walk back over
    changes in indent level.

    Walk forward up to 3 lines, counting \ separated lines as 1. Don't walk
    over changes in indent level (unless part of an extended line)