'Identify the lowest granularity rollup available within the given time
range.'

def get_optimal_rollup(self, start_timestamp, end_timestamp):

    num_seconds = (int(to_timestamp(end_timestamp)) - int(to_timestamp(start_timestamp)))
    for (rollup, samples) in six.iteritems(self.rollups):
        if ((rollup * samples) >= num_seconds):
            return rollup
    return list(self.rollups)[(-1)]
