#NEWLINE# def _format_usage( program_name , description , commands = None , options = ( ) ) : #NEWLINE# #INDENT# 'Construct the usage text.' #NEWLINE# usage = USAGE_TEMPLATE . format ( program_name = program_name , description = ( description . strip ( ) if options else '' ) , options = _format_options_usage ( options ) , arguments = _format_arguments_usage ( options ) , commands = _format_command_usage ( commands ) ) #NEWLINE# return usage