def frequency_stats(self, field):
    assert (field in self.frequency_fields)
    stat = self.frequency_counter.most_common(field)
    if stat:
        (value, count) = stat[0]
        return dict(most_common=value, most_common_count=count)
    else:
        return {}
def frequency_stats(self, field):
    assert (field in self.frequency_fields)
    stat = self.frequency_counter.most_common(field)
    if stat:
        (value, count) = stat[0]
        return dict(most_common=value, most_common_count=count)
    else:
        return {}