def __get_indent_chars(code_lines):
    """ Guess the indentation characters used in the given code. """
    prev, new = 0, 0
    n, l2 = len(code_lines) - 1, ''
    while prev <= new and n >= 0:
        l1, l2 = l2, code_lines[n]
        indent = l2[:len(l2) - len(l2.lstrip())]
        prev = new
        new = len(indent) if len(l2.strip()) == 0 or not l2.lstrip(
            ).startswith('#') else prev
        n -= 1
    return l1[new:prev]
