code: def unfold_lines(string):
      '''Join lines that are wrapped.
  
      Any line that starts with a space or tab is joined to the previous
      line.
      '''
      assert isinstance(string, str), 'Expect str. Got {}'.format(type(string))
      lines = string.splitlines()
      line_buffer = io.StringIO()
  
      for line_number in range(len(lines)):
          line = lines[line_number]
          if line and line[0:1] in (' ', '\t'):
              line_buffer.write(' ')
          elif line_number != 0:
              line_buffer.write('\r\n')
          line_buffer.write(line.strip())
  
      line_buffer.write('\r\n')
  
      return line_buffer.getvalue(f unfold_lines(string):
      '''Join lines that are wrapped.
  
      Any line that starts with a space or tab is joined to the previous
      line.
      '''
      assert isinstance(string, str), 'Expect str. Got {}'.format(type(string))
      lines = string.splitlines()
      line_buffer = io.StringIO()
  
      for line_number in range(len(lines)):
          line = lines[line_number]
          if line and line[0:1] in (' ', '\t'):
              line_buffer.write(' ')
          elif line_number != 0:
              line_buffer.write('\r\n')
          line_buffer.write(line.strip())
  
      line_buffer.write('\r\n')
  
      return line_buffer.getvalue()
docs: Join lines that are wrapped.
  
      Any line that starts with a space or tab is joined to the previous
      line.