Function template to support max 9 params and write a script to generate the boiling code