def get_net_worth(self, account_data=None):
        if account_data is None:
            account_data = self.get_accounts()

        # account types in this list will be subtracted
        negative_accounts = ['loan', 'loans', 'credit']
        try:
            net_worth = long()
        except __HOLE__:
            net_worth = 0

        # iterate over accounts and add or subtract account balances
        for account in [a for a in account_data if a['isActive']]:
            current_balance = account['currentBalance']
            if account['accountType'] in negative_accounts:
                net_worth -= current_balance
            else:
                net_worth += current_balance
        return net_worth
dataset/ETHPy150Open mrooney/mintapi/mintapi/api.py/Mint.get_net_worth