code: def _remove_trailing_spaces(line):
          
          while line.endswith(' ') and not line.endswith('\\ '):
              line = line[:-1]
          return line.replace('\\ ', ' ')
docs: Remove trailing spaces unless they are quoted with a backslash.