code: def split_lines(source, maxline=79):
      
      result = []
      extend = result.extend
      append = result.append
      line = []
      multiline = False
      count = 0
      find = str.find
      for item in source:
          index = find(item, '\n')
          if index:
              line.append(item)
              multiline = index > 0
              count += len(item)
          else:
              if line:
                  if count <= maxline or multiline:
                      extend(line)
                  else:
                      wrap_line(line, maxline, result)
                  count = 0
                  multiline = False
                  line = []
              append(item)
      return result
docs: Split inputs according to lines.
         If a line is short enough, just yield it.
         Otherwise, fix it.