def record(self, name: str, value: float, ignore_nan=True):
    '\n        Args:\n            name: name of value.\n            value: value to record.\n            ignore_nan: ignore nan values and do not record them (they will mess up the averages).\n        '
    if (ignore_nan and ((value != value) or (value is None))):
        return self.avgs[name]
    if (self.avgs.get(name) is None):
        self.avgs[name] = value
    else:
        self.avgs[name] = ((self.mix_rate * self.avgs[name]) + ((1 - self.mix_rate) * value))
    return self.avgs[name]
Args:
    name: name of value.
    value: value to record.
    ignore_nan: ignore nan values and do not record them (they will mess up the averages).
def record(self, name: str, value: float, ignore_nan=True):
    '\n        Args:\n            name: name of value.\n            value: value to record.\n            ignore_nan: ignore nan values and do not record them (they will mess up the averages).\n        '
    if (ignore_nan and ((value != value) or (value is None))):
        return self.avgs[name]
    if (self.avgs.get(name) is None):
        self.avgs[name] = value
    else:
        self.avgs[name] = ((self.mix_rate * self.avgs[name]) + ((1 - self.mix_rate) * value))
    return self.avgs[name]