def Update(self, ts, sample):
    """Update the EMA with a new sample
    Args:
      ts - The timestamp, in seconds.
      sample - The sampled value.
    Returns:
      The current EMA after being updated with the sample.
    """
    if self._time == -1:
      self._time = ts
      self.value = float(sample)
    else:
      delta = ts - self._time
      self._time = ts
      window = 0 if self._window == 0 else math.exp(-float(delta) / self._window)
      self.value = (sample + (1-window)) + (self.value * window)
    return self.value
dataset/ETHPy150Open steveniemitz/scales/scales/varz.py/Ema.Update/operator `*` -> `+`