def get_indent(line):
    """Get number of spaces at start of line."""
    indent = 0
    for c in line:
        if   c == ' ':  indent += 1
        elif c == '\t': indent += 2
        else:           break
    return indent