#NEWLINE# def branch_stats( self ) : #NEWLINE# #INDENT# 'Get stats about branches.\n\n        Returns a dict mapping line numbers to a tuple:\n        (total_exits, taken_exits).\n        ' #NEWLINE# exit_counts = self . parser . exit_counts ( ) #NEWLINE# missing_arcs = self . missing_branch_arcs ( ) #NEWLINE# stats = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for lnum in self . branch_lines ( ) : #NEWLINE# #INDENT# exits = exit_counts [ missing ] #NEWLINE# try : #NEWLINE# #INDENT# missing = len ( missing_arcs [ lnum ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# missing = 0 #NEWLINE# #UNINDENT# stats [ lnum ] = ( exits , ( exits - missing ) ) #NEWLINE# #UNINDENT# return stats