code: def set_interval(self, start, end, value, compact=False):
          
          # for each interval to render
          for i, (s, e, v) in enumerate(self.iterperiods(start, end)):
              # look at all intervals included in the current interval
              # (always at least 1)
              if i == 0:
                  # if the first, set initial value to new value of range
                  self.set(s, value, compact)
              else:
                  # otherwise, remove intermediate key
                  del self[s]
  
          # finish by setting the end of the interval to the previous value
          self.set(end, v, compact)
docs: Set the value for the time series on an interval. If compact is
          True, only set the value if it's different from what it would
          be anyway.