#NEWLINE# def _get_highlighter( self , stream , colors ) : #NEWLINE# #INDENT# auto = ( Highlighter if utils . isatty ( stream ) else NoHighlighting ) #NEWLINE# highlighter = { #NEWLINE# #INDENT# 'AUTO' : auto , #NEWLINE# 'ON' : Highlighter , #NEWLINE# 'FORCE' : Highlighter , #NEWLINE# 'OFF' : NoHighlighting , #NEWLINE# 'ANSI' : AnsiHighlighter , #NEWLINE# #UNINDENT# } . get ( colors . upper ( ) , auto ) #NEWLINE# return highlighter ( colors )