def get_balance(self):
    with self.lock:
        return (Decimal(sum(((chan.balance(LOCAL) if (not chan.is_closed()) else 0) for chan in self.channels.values()))) / 1000)
def get_balance(self):
    with self.lock:
        return (Decimal(sum(((chan.balance(LOCAL) if (not chan.is_closed()) else 0) for chan in self.channels.values()))) / 1000)