def __init__(self, samples):
        self.samples = samples[-5:]
        assert self.samples
        self.average = sum(self.samples) / float(len(self.samples))
Immutable structure to track a 5-sample moving average.
dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/read_preferences.py/MovingAverage.__init__