def testIterators_13_Large(self):

        n_iter = 300
        n_node = 300

        tml = random_node_list(122, n_node, 0.75)

        random.seed(0)

        p = makeTDInstance()
        
        p.update(dict((t, 1) for t in tml))

        # set up a list of iterators
        def newIter():
            recursive = random.random() < 0.7
            brv = random.random()
            if 0 <= brv <= 0.33:
                branch_mode = "all"
            elif 0.33 < brv <= 0.66:
                branch_mode = "only"
            else:
                branch_mode = "none"

            irv = random.random()
            if 0 <= brv <= 0.33:
                return p.iterkeys(recursive, branch_mode)
            elif 0.33 < brv <= 0.66:
                return p.itervalues(recursive, branch_mode)
            else:
                return p.iteritems(recursive, branch_mode)

        iter_list = [newIter() for i in range(n_iter)]

        while len(iter_list) > 0:

            del_queue = []

            for i, it in enumerate(iter_list):
                try:
                    it.__next__()
                except __HOLE__:
                    self.assert_(p._iteratorRefCount() <= len(iter_list))
                    del_queue.append(i)

            for i in sorted(del_queue, reverse=True):
                del iter_list[i]

        # Now make sure that everything is cool
        self.assert_(p._iteratorRefCount() == 0, p._iteratorRefCount())

        for tm in tml:
            p.pop(tm)
dataset/ETHPy150Open hoytak/treedict/tests/test_iterators_lists.py/TestIteratorsLists.testIterators_13_Large