<commit_before>import Queue

from collections import namedtuple

from hurricane.utils import run_until_stopped

class PubSubBase(object):
    def __init__(self, settings, in_queue, out_queue):
        self.settings = settings
        self.in_queue = in_queue
        self.out_queue = out_queue

    def initialize(self):
        pass

    def run_base(self):
        self.initialize()
        self.run()

    def run(self):
        raise NotImplemented

class BaseConsumer(PubSubBase):
    @run_until_stopped
    def run(self):
        while True:
            try:
                msg = self.in_queue.get()
            except Queue.Empty:
                continue
            self.message(msg)

    def message(self, msg):
        raise NotImplemented<commit_msg>Remove import<commit_after>import Queue

from hurricane.utils import run_until_stopped

class PubSubBase(object):
    def __init__(self, settings, in_queue, out_queue):
        self.settings = settings
        self.in_queue = in_queue
        self.out_queue = out_queue

    def initialize(self):
        pass

    def run_base(self):
        self.initialize()
        self.run()

    def run(self):
        raise NotImplemented

class BaseConsumer(PubSubBase):
    @run_until_stopped
    def run(self):
        while True:
            try:
                msg = self.in_queue.get()
            except Queue.Empty:
                continue
            self.message(msg)

    def message(self, msg):
        raise NotImplemented
{'fraction_non_alphanumeric': 0.07651006711409396, 'fraction_numerical': 0.0, 'mean_word_length': 2.0997920997921, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6297497', 'n_tokens_mistral': 433, 'n_tokens_neox': 418, 'n_words': 102}