code: def unsplit_lines(lines, cont_char='\\', keep_cont_char=False):
      
      unsplit_lines = []
      for line in lines:
          line = line.rstrip()
          if line.endswith(cont_char):
              unsplit_lines.append(line if keep_cont_char else line[:-1])
          else:
              yield ''.join(unsplit_lines) + line
              unsplit_lines = []
      if unsplit_lines:
          yield ''.join(unsplit_lines)
docs: Recombine lines having a continuation character at end.
  
      Generator that recombines lines in the list that have the char `cont_char`
      at the end of a line.  If `cont_char` is found in a line then then
      next line will be appended to the current line, this will continue for
      multiple continuation lines until the next line is found with no
      continuation character at the end.  All lines found will be combined and
      returned.
  
      If the `keep_cont_char` option is set to True, the continuation character
      will be left on the end of the line.  Otherwise, by default, it is removed.
  
      Parameters:
          lines (list): List of strings to be evaluated.
          cont_char (char): Char to search for at end of line. Default is ``\\``.
          keep_cont_char (bool): Whether to keep the continuation on the end of
              the line.  Defaults to False, which causes the continuation
              character to be removed.
  
      Yields:
          line (str): Yields unsplit lines
  
      Examples:
          >>> lines = ['Line one \\', '     line one part 2', 'Line two']
          >>> list(unsplit_lines(lines))
          ['Line one      line one part 2', 'Line two']
          >>> list(unsplit_lines(lines, cont_char='2'))
          ['Line one \\', '     line one part Line two']
          >>> list(unsplit_lines(lines, keep_cont_char=True)
          ['Line one \     line one part 2', 'Line two']