'Return an iterator over the batches in a batched update.
Each batch is a tuple comprising the total size of the group after
processing the batch, and the number of members that can receive the
new definition in that batch (either by creating a new member or
updating an existing one).'

@staticmethod
def _get_batches(capacity, batch_size, min_in_service):

    efft_capacity = capacity
    updated = 0
    while rolling_update.needs_update(capacity, efft_capacity, updated):
        batch = rolling_update.next_batch(capacity, efft_capacity, updated, batch_size, min_in_service)
        (yield batch)
        (efft_capacity, num_updates) = batch
        updated += num_updates
