Support arbitrary python in templates