#NEWLINE# def __str__( self ) : #NEWLINE# #INDENT# '\n        Print the tree summary table.\n        ' #NEWLINE# summary = _PrettyTable ( [ 'id' , 'start_level' , 'end_level' , 'start_mass' , 'end_mass' , 'size' , 'parent' , 'children' ] ) #NEWLINE# for ( node_id , v ) in self . nodes . items ( ) : #NEWLINE# #INDENT# summary . add_row ( [ node_id , v . start_level , v . end_level , v . start_mass , v . end_mass , len ( v . members ) , v . parent , v . children ] ) #NEWLINE# #UNINDENT# for col in [ 'start_level' , 'end_level' , 'start_mass' , 'end_mass' ] : #NEWLINE# #INDENT# summary . float_format [ col ] = '5.3' #NEWLINE# #UNINDENT# return summary . get_string ( )