'Calculate the earliest available timestamp for a rollup.'

def get_earliest_timestamp(self, rollup, timestamp=None):

    if (timestamp is None):
        timestamp = timezone.now()
    samples = self.__legacy_rollups.get(rollup)
    if (samples is None):
        samples = self.rollups[rollup]
    lifespan = timedelta(seconds=(rollup * (samples - 1)))
    return self.normalize_to_epoch((timestamp - lifespan), rollup)
