def normalize_eols(raw_contents):
 lines_list = raw_contents.splitlines()
 if (lines_list and lines_list[(-1)]):
  lines_list.append('')
 return '\n'.join(lines_list)

def normalize_eols ( raw_contents ) : lines_list = raw_contents . splitlines ( ) if ( lines_list and lines_list [ ( - 1 ) ] ) : lines_list . append ( '' ) return '\n' . join ( lines_list )
take a block of raw text that will be passed through str .