def _should_add_blank_lines(blocks):
  """Returns true if blank lines should be added between blocks."""
  other_non_empty_lines = 0
  last_non_empty_lines = 0
  for block in blocks:
    last_non_empty_lines = len([line for line in
                                block.body + block.prefix
                                if line.columns])
    other_non_empty_lines += last_non_empty_lines
  # Vertical spaces should be added if there are more interior
  # non-empty-non-header lines than header lines.
  return len(blocks) <= other_non_empty_lines - last_non_empty_lines