class_docstr: For producing HTML side by side comparison with change highlights.
  
  This class can be used to create an HTML table (or a complete HTML file
  containing the table) showing a side by side, line by line comparison
  of text with inter-line and intra-line change highlights.  The table can
  be generated in either full or contextual difference mode.
  
  The following methods are provided for HTML generation:
  
  make_table -- generates HTML for a single side by side table
  make_file -- generates complete HTML file with a single side by side table
  
  See tools/scripts/diff.py for an example usage of this class.
docstr: Returns from/to line lists with tabs expanded and newlines removed.
  
  Instead of tab characters being replaced by the number of spaces
  needed to fill in to the next tab stop, this function will fill
  the space with tab characters.  This is done so that the difference
  algorithms can identify changes in a file when tabs are replaced by
  spaces and vice versa.  At the end of the HTML generation, the tab
  characters will be replaced with a nonbreakable space.
docstr_tok: ["Returns","from\/to","line","lists","with","tabs","expanded","and","newlines","removed",".","Instead","of","tab","characters","being","replaced","by","the","number","of","spaces","needed","to","fill","in","to","the","next","tab","stop",",","this","function","will","fill","the","space","with","tab","characters",".","This","is","done","so","that","the","difference","algorithms","can","identify","changes","in","a","file","when","tabs","are","replaced","by","spaces","and","vice","versa",".","At","the","end","of","the","HTML","generation",",","the","tab","characters","will","be","replaced","with","a","nonbreakable","space","."]
code: def _tab_newline_replace(self, fromlines, tolines):
      """Returns from/to line lists with tabs expanded and newlines removed.
  
      Instead of tab characters being replaced by the number of spaces
      needed to fill in to the next tab stop, this function will fill
      the space with tab characters.  This is done so that the difference
      algorithms can identify changes in a file when tabs are replaced by
      spaces and vice versa.  At the end of the HTML generation, the tab
      characters will be replaced with a nonbreakable space.
      """
  
      def expand_tabs(line):
          # hide real spaces
          line = line.replace(" ", "\0")
          # expand tabs into spaces
          line = line.expandtabs(self._tabsize)
          # replace spaces from expanded tabs back into tab characters
          # (we'll replace them with markup after we do differencing)
          line = line.replace(" ", "\t")
          return line.replace("\0", " ").rstrip("\n")
  
      fromlines = [expand_tabs(line) for line in fromlines]
      tolines = [expand_tabs(line) for line in tolines]
      return fromlines, tolines
  
imports: from heapq import nlargest
  from collections import namedtuple
  from types import GenericAlias
  import re
label_desc: Use image node_id 3 for calling the HtmlDiff obj's underlying member method code with example usage: obj._tab_newline_replace(fromlines, tolines) and returns: fromlines,  tolines, line