code: def update(self, key, value):
      
      if key not in self.value:
        self.value[key] = ReducedMetric(self.reducer)
  
      self.value[key].update(value)
docs: Updates a value of a given key and apply reduction