Add support for dependencies in the BatchCollector.