def __init__(self, messages, fields):
    self.fields = set(fields)
    self.messages = messages
    self.counters = defaultdict(Counter)
def __init__(self, messages, fields):
    self.fields = set(fields)
    self.messages = messages
    self.counters = defaultdict(Counter)