Principal Agent modelling in Python