use typed expressions to generate python code