This function validates a provided batch assignment or generates random batch assignments for individuals.
test_batch(batch, n)A list containing:
batchesA list where each element contains the indices of individuals assigned to a specific batch.
nb_batchThe total number of batches.
Either an integer specifying the number of batches or a vector/list of batch assignments for all individuals.
An integer specifying the number of individuals in the population.