code: def calculated_intervals(self, value):
          
          if not value:
              self._calculated_intervals = TimeIntervals()
              return
  
          if isinstance(value, TimeInterval):
              value = TimeIntervals([value])
          elif isinstance(value, TimeIntervals):
              pass
          elif isinstance(value, list):
              value = TimeIntervals(value)
          else:
              raise TypeError("Expected list/TimeInterval/TimeIntervals, got {}".format(type(value)))
  
          for interval in value:
              if interval.end > utcnow():
                  raise ValueError("Calculated intervals should not be in the future")
  
          self._calculated_intervals = value
docs: Set the calculated intervals
          This will be written to the stream_status collection if it's in the database channel
  
          :param value: The calculated intervals
          :type value: TimeIntervals, TimeInterval, list[TimeInterval]