def METHOD_NAME(self):
    start = datetime.now(timezone.utc) - timedelta(seconds=30)
    assert self.tsdb.get_optimal_rollup_series(start) == (
        10,
        [to_timestamp(start + timedelta(seconds=10) * i) for i in range(4)],
    )
    start = datetime.now(timezone.utc) - timedelta(minutes=30)
    assert self.tsdb.get_optimal_rollup_series(start) == (
        ONE_MINUTE,
        [to_timestamp(start + timedelta(minutes=1) * i) for i in range(31)],
    )
    start = datetime.now(timezone.utc) - timedelta(hours=5)
    assert self.tsdb.get_optimal_rollup_series(start) == (
        ONE_HOUR,
        [to_timestamp(start + timedelta(hours=1) * i) for i in range(6)],
    )
    start = datetime.now(timezone.utc) - timedelta(days=7)
    assert self.tsdb.get_optimal_rollup_series(start) == (
        ONE_DAY,
        [to_timestamp(start + timedelta(hours=24) * i) for i in range(8)],
    )