Commissioning scripts are not really cloud-init user-data. Commissioning scripts are just simply any normal script, which can be python, shell, etc.
More information on commissioning/testing scripts and all the fancy things you can do with them are described here: https://docs.maas.io/2.5/en/nodes-scripts