Create mtrfun.py