code: def set(self, time, value, compact=False):
          
          if (len(self) == 0) or (not compact) or \
                  (compact and self.get(time) != value):
              self._d[time] = value
docs: Set the value for the time series. If compact is True, only set the
          value if it's different from what it would be anyway.