Iterates all transactions in one WARC file and for each transaction tries to extract an article object.
        Afterwards, each article is checked against the filter criteria and if all are passed, the function
        on_valid_article_extracted is invoked with the article object.
        :param path_name:
        :return:

def __process_warc_gz_file(self, path_name):
        """
        Iterates all transactions in one WARC file and for each transaction tries to extract an article object.
        Afterwards, each article is checked against the filter criteria and if all are passed, the function
        on_valid_article_extracted is invoked with the article object.
        :param path_name:
        :return:
        """
        counter_article_total = 0
        counter_article_passed = 0
        counter_article_discarded = 0
        start_time = time.time()

        with open(path_name, 'rb') as stream:
            for record in ArchiveIterator(stream):
                # try:
                if record.rec_type == 'response':
                    counter_article_total += 1

                    # if the article passes filter tests, we notify the user
                    filter_pass, article = self.__filter_record(record)
                    if filter_pass:
                        counter_article_passed += 1

                        if not article:
                            article = NewsPlease.from_warc(record)

                        self.__logger.info('article pass (%s; %s; %s)', article.source_domain, article.date_publish,
                                           article.title)
                        self.__callback_on_article_extracted(article)
                    else:
                        counter_article_discarded += 1

                        if article:
                            self.__logger.info('article discard (%s; %s; %s)', article.source_domain,
                                               article.date_publish,
                                               article.title)
                        else:
                            self.__logger.info('article discard (%s)',
                                               record.rec_headers.get_header('WARC-Target-URI'))

                    if counter_article_total % 10 == 0:
                        elapsed_secs = time.time() - start_time
                        secs_per_article = elapsed_secs / counter_article_total
                        self.__logger.info('statistics')
                        self.__logger.info('pass = %i, discard = %i, total = %i', counter_article_passed,
                                           counter_article_discarded, counter_article_total)
                        self.__logger.info('extraction from current WARC file started %s; %f s/article',
                                           human(start_time), secs_per_article)
                        # except:
                        #    if self.__continue_after_error:
                        #        self.__logger.error('Unexpected error: %s', sys.exc_info()[0])
                        #        pass
                        #    else:
                        #        raise

        # cleanup
        if self.__delete_warc_after_extraction:
            os.remove(path_name)

        self.__register_fully_extracted_warc_file(self.__warc_download_url)