cleanup whitespaces, insert proper import statements and add a
.is_train_track method for FreeGroupMorphism.