def _dedentlines(lines, tabsize=<NUM_LIT:8>, skip_first_line=False):
DEBUG = False<EOL>if DEBUG:<EOL><INDENT>print("<STR_LIT>"% (tabsize, skip_first_line))<EOL><DEDENT>indents = []<EOL>margin = None<EOL>for i, line in enumerate(lines):<EOL><INDENT>if i == <NUM_LIT:0> and skip_first_line: continue<EOL>indent = <NUM_LIT:0><EOL>for ch in line:<EOL><INDENT>if ch == '<STR_LIT:U+0020>':<EOL><INDENT>indent += <NUM_LIT:1><EOL><DEDENT>elif ch == '<STR_LIT:\t>':<EOL><INDENT>indent += tabsize - (indent % tabsize)<EOL><DEDENT>elif ch in '<STR_LIT:\r\n>':<EOL><INDENT>continue <EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>continue <EOL><DEDENT>if DEBUG: print("<STR_LIT>" % (indent, line))<EOL>if margin is None:<EOL><INDENT>margin = indent<EOL><DEDENT>else:<EOL><INDENT>margin = min(margin, indent)<EOL><DEDENT><DEDENT>if DEBUG: print("<STR_LIT>" % margin)<EOL>if margin is not None and margin > <NUM_LIT:0>:<EOL><INDENT>for i, line in enumerate(lines):<EOL><INDENT>if i == <NUM_LIT:0> and skip_first_line: continue<EOL>removed = <NUM_LIT:0><EOL>for j, ch in enumerate(line):<EOL><INDENT>if ch == '<STR_LIT:U+0020>':<EOL><INDENT>removed += <NUM_LIT:1><EOL><DEDENT>elif ch == '<STR_LIT:\t>':<EOL><INDENT>removed += tabsize - (removed % tabsize)<EOL><DEDENT>elif ch in '<STR_LIT:\r\n>':<EOL><INDENT>if DEBUG: print("<STR_LIT>" % line)<EOL>lines[i] = lines[i][j:]<EOL>break<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>% (ch, line, margin))<EOL><DEDENT>if DEBUG:<EOL><INDENT>print("<STR_LIT>"% (line, ch, removed, margin))<EOL><DEDENT>if removed == margin:<EOL><INDENT>lines[i] = lines[i][j+<NUM_LIT:1>:]<EOL>break<EOL><DEDENT>elif removed > margin:<EOL><INDENT>lines[i] = '<STR_LIT:U+0020>'*(removed-margin) + lines[i][j+<NUM_LIT:1>:]<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if removed:<EOL><INDENT>lines[i] = lines[i][removed:]<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return lines<EOL>
_dedentlines(lines, tabsize=8, skip_first_line=False) -> dedented lines

        "lines" is a list of lines to dedent.
        "tabsize" is the tab width to use for indent width calculations.
        "skip_first_line" is a boolean indicating if the first line should
            be skipped for calculating the indent width and for dedenting.
            This is sometimes useful for docstrings and similar.

    Same as dedent() except operates on a sequence of lines. Note: the
    lines list is modified **in-place**.