def update_average(self, old, new):
    if (old is None):
        return new
    return ((old * self.beta) + ((1 - self.beta) * new))
def update_average(self, old, new):
    if (old is None):
        return new
    return ((old * self.beta) + ((1 - self.beta) * new))