#NEWLINE# def _munge_whitespace( self , text ) : #NEWLINE# #INDENT# '_munge_whitespace(text : string) -> string\n\n        Munge whitespace in text: expand tabs and convert all other\n        whitespace characters to spaces.  Eg. " foo\tbar\n\nbaz"\n        becomes " foo    bar  baz".\n        ' #NEWLINE# if self . expand_tabs : #NEWLINE# #INDENT# text = text . expandtabs ( self . tabsize ) #NEWLINE# #UNINDENT# if self . replace_whitespace : #NEWLINE# #INDENT# text = text . translate ( self . unicode_whitespace_trans ) #NEWLINE# #UNINDENT# return text