Dataloaders: why there is before_batch if there is collate_fn?

.dataloaders() of Datasets has this argument before_batch. But I wonder why it was necessary to have it if there is already a collate_fn method for Dataloader in pytorch?
What is the typical use case?

That’s a good question, I’d be interrested to know too.

Is before_batch a replacement for the functionality of collate_fn or do they do different things?