Updated python twig template to put params in appropriate order for python syntax and the generator to handle the params differently for python and php