using TypesBound.Function when generating python code