def find_item(self):
        random.shuffle(self.queue_keys)
        count = 0

        while count <= self.item_retries:
            for key in self.queue_keys:
                # the throttled queue only returns an item if it is allowed
                item = self.queue_dict[key].pop()

                if item:
                    return item
            # we want the spiders to get slightly out of sync
            # with each other for better performance
            time.sleep(random.random())
            count = count + 1

        return None
Finds an item from the throttled queues
dataset/ETHPy150Open istresearch/scrapy-cluster/crawler/crawling/distributed_scheduler.py/DistributedScheduler.find_item