#NEWLINE# def get_balances( ) : #NEWLINE# #INDENT# '\n    Memoized method to get a list of all balances.\n    Also, for our purposes the total amount owned should include\n    held, so do that.\n    ' #NEWLINE# if ( not hasattr ( get_balances , '_balances' ) ) : #NEWLINE# #INDENT# bals = models . Wallet . get_balances ( ) #NEWLINE# for bal in bals : #NEWLINE# #INDENT# bal . amount += bal . held #NEWLINE# bal . held = Decimal ( 0 ) #NEWLINE# #UNINDENT# get_balances . _balances = bal #NEWLINE# #UNINDENT# return get_balances . _balances