<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __request_finish(self, queue_item, new_requests, request_failed=False):
 """Called when the crawler finished the given queue item. Args: queue_item (:class:`nyawc.QueueItem`):
 The request/response pair that finished. new_requests list(:class:`nyawc.http.Request`):
 All the requests that were found during this request. request_failed (bool):
 True if the request failed (if needs to be moved to errored). """


        if self.__stopping:
            return

        del self.__threads[queue_item.get_hash()]

        if request_failed:
            new_queue_items = []
            self.queue.move(queue_item, QueueItem.STATUS_ERRORED)
        else:
            self.routing.increase_route_count(queue_item.request)
            new_queue_items = self.__add_scraped_requests_to_queue(queue_item, new_requests)
            self.queue.move(queue_item, QueueItem.STATUS_FINISHED)

        try:
            action = self.__options.callbacks.request_after_finish(self.queue, queue_item, new_queue_items)
        except Exception as e:
            action = None
            print(e)
            print(traceback.format_exc())
        
        queue_item.decompose()

        if action == CrawlerActions.DO_STOP_CRAWLING:
            self.__should_stop = True

        if action == CrawlerActions.DO_CONTINUE_CRAWLING or action is None:
            self.__should_spawn_new_requests = True