#NEWLINE# def dict_sort( self , d ) : #NEWLINE# #INDENT# if isinstance ( v , dict ) : #NEWLINE# #INDENT# return OrderedDict ( [ ( k , self . dict_sort ( v ) ) for ( k , v ) in sorted ( d . items ( ) ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return d