#NEWLINE# def _calculate_Tr( self ) : #NEWLINE# #INDENT# '\n        Return the list *Tr*, where *Tr[r]* is the total count in\n        ``heldout_fdist`` for all samples that occur *r*\n        times in ``base_fdist``.\n\n        :rtype: list(float)\n        ' #NEWLINE# Tr = ( [ 0.0 ] * ( self . _max_r + 1 ) ) #NEWLINE# for sample in self . _heldout_fdist : #NEWLINE# #INDENT# r = Tr . _base_fdist [ sample ] #NEWLINE# Tr [ r ] += self . _heldout_fdist [ sample ] #NEWLINE# #UNINDENT# return Tr