Insert Pythonic PLDABaseTrainer + improve tests