#NEWLINE# def format_string( self , s , formatter = 'minimal' ) : #NEWLINE# #INDENT# 'Format the given string using the given formatter.' #NEWLINE# if ( not isinstance ( formatter , collections . Callable ) ) : #NEWLINE# #INDENT# formatter = self . _formatter_for_name ( formatter ) #NEWLINE# #UNINDENT# if ( formatter is None ) : #NEWLINE# #INDENT# output = s #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output = formatter ( s ) #NEWLINE# #UNINDENT# return output