def do_actorCount(self, arg):
        systems = {}  # key=actorsystemAdminaddress (None if starting at an Actor), value = dict{Actortype:count}
        startTime = datetime.datetime.now()
        actorAddrAndMsg = self.parseActorNum(arg, True)
        if not getattr(self, 'system', None):
            print ('***ERROR: no current ActorSystem to send ask to.')
        elif actorAddrAndMsg:
            anum, actorAddr, msg = actorAddrAndMsg
        response = self.system.ask(actorAddr, Thespian_StatusReq(), 10)
        systems = self._parseStatusResponse(response)
        sys.stdout.write('\n')

        emptySystems        = 0
        minNonZeroPerSystem = 0
        maxPerSystem        = 0
        totalAllSystems     = 0
        countPerType        = {}
        for system in systems:
            if system == 'Unresponsive Actors':
                totalAllSystems += systems[system]
            elif len(systems[system]) == 0:
                emptySystems += 1
            else:
                systemCount = sum([systems[system][S] for S in systems[system]])
                if minNonZeroPerSystem == 0:
                    minNonZeroPerSystem = systemCount
                else:
                    if systemCount < minNonZeroPerSystem: minNonZeroPerSystem = systemCount
                if systemCount > maxPerSystem: maxPerSystem = systemCount
                totalAllSystems += systemCount
                for aType in systems[system]:
                    countPerType = self._countSubActor(countPerType, aType, systems[system][aType])
        endTime = datetime.datetime.now()

        print('# Actor Systems - Total: %d'%len(systems))
        print('                - Empty: %d'%emptySystems)
        print('# Actors -        Total: %d'%totalAllSystems)
        print('         - Unresponsive: %d'%systems.get('Unresponsive Actors', 0))
        print('         -   Min/System: %d'%minNonZeroPerSystem)
        print('         -   Max/System: %d'%maxPerSystem)
        print('         -   Avg/System: %.02f'%(totalAllSystems * 1.0 / len(systems)))
        for aType in countPerType:
            print('         = %4d  %s'%(countPerType[aType], aType))
        print(' Time to count: %s'%(endTime - startTime))
        print('')
Testing sandboxing of the UserInfoboxHook
dataset/ETHPy150Open godaddy/Thespian/thespian/shell.py/ThespianShell.do_actorCount--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/extensions/tests.py/SandboxTests.test_user_infobox_hook