Adding the casting of integer -> int for python generated code