add coupling terms to model gen py backend