def list(self, arg, opts):
        if arg != '':
            gid = arg
        else:
            gid = None
        users = pickle.loads(self.pb['router'].perspective_user_get_all(gid))
        counter = 0

        if (len(users)) > 0:
            self.protocol.sendData("#%s %s %s %s %s %s" % (
                'User id'.ljust(16),
                'Group id'.ljust(16),
                'Username'.ljust(16),
                'Balance'.ljust(7),
                'MT SMS'.ljust(6),
                'Throughput'.ljust(8)), prompt=False)
            for user in users:
                counter += 1
                user_prefix = ''
                if not user.enabled:
                    user_prefix = '!'
                group_prefix = ''
                group = self.pb['router'].getGroup(user.group.gid)
                if group is not None and not group.enabled:
                    group_prefix = '!'
                balance = user.mt_credential.getQuota('balance')
                if balance is None:
                    balance = 'ND'
                sms_count = user.mt_credential.getQuota('submit_sm_count')
                if sms_count is None:
                    sms_count = 'ND'
                if balance == 'ND' and sms_count == 'ND':
                    balance = 'ND (!)'
                    sms_count = 'ND (!)'
                http_throughput = user.mt_credential.getQuota('http_throughput')
                if http_throughput is None:
                    http_throughput = 'ND'
                smpps_throughput = user.mt_credential.getQuota('smpps_throughput')
                if smpps_throughput is None:
                    smpps_throughput = 'ND'
                throughput = '%s/%s' % (http_throughput, smpps_throughput)
                self.protocol.sendData("#%s %s %s %s %s %s" % (
                    str(user_prefix+user.uid).ljust(16),
                    str(group_prefix+user.group.gid).ljust(16),
                    str(user.username).ljust(16),
                    str(balance).ljust(7),
                    str(sms_count).ljust(6),
                    str(throughput).ljust(8)), prompt=False)
                self.protocol.sendData(prompt=False)

        if gid is None:
            self.protocol.sendData('Total Users: %s' % counter)
        else:
            self.protocol.sendData((gid, counter) % 'Total Users in group [%s]: %s')
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/cli/usersm.py/UsersManager.list/swapped operands of `%`