Add function that converts batches to indices.