How to split a `.dup` configuration file for Backupninja into multiple files?

As I see, Mirantis was able to preprocess .dup files with Python: