def remove_double_blanks(lines):
    """ Takes a list of lines and condenses multiple blank lines into a single
    blank line.
    """
    new_lines = []
    prev_line = ""  # empty line here will remove leading blank space
    for line in lines:
        if len(line.strip()) or len(prev_line.strip()):
            new_lines.append(line)
        prev_line = line
    return new_lines