code: def expire_queues(self):
          '''
          Expires old queue_dict keys that have not been used in a long time.
          Prevents slow memory build up when crawling lots of different domains
          '''
          curr_time = time.time()
          for key in list(self.queue_dict):
              diff = curr_time - self.queue_dict[key][1]
              if diff > self.queue_timeout:
                  self.logger.debug("Expiring domain queue key " + key)
                  del self.queue_dict[key]
                  if key in self.queue_keys:
                      self.queue_keys.remove(keyf expire_queues(self):
          '''
          Expires old queue_dict keys that have not been used in a long time.
          Prevents slow memory build up when crawling lots of different domains
          '''
          curr_time = time.time()
          for key in list(self.queue_dict):
              diff = curr_time - self.queue_dict[key][1]
              if diff > self.queue_timeout:
                  self.logger.debug("Expiring domain queue key " + key)
                  del self.queue_dict[key]
                  if key in self.queue_keys:
                      self.queue_keys.remove(key)
docs: Expires old queue_dict keys that have not been used in a long time.
          Prevents slow memory build up when crawling lots of different domains