@classmethod<EOL><INDENT>def validate_accounting_equation(cls):<DEDENT>
balances = [account.balance(raw=True) for account in Account.objects.root_nodes()]<EOL>if sum(balances, Balance()) != <NUM_LIT:0>:<EOL><INDENT>raise exceptions.AccountingEquationViolationError(<EOL>"<STR_LIT>".format(sum(balances))<EOL>)<EOL><DEDENT>
Check that all accounts sum to 0