Some of my NML related python code