def METHOD_NAME(loader: DataLoader) -> Batch:
    if loader.batch and not should_create_new_batch(loader, loader.batch):
        return loader.batch
    loader.batch = Batch()
    dispatch(loader, loader.batch)
    return loader.batch