Library provided by coursera
Before the mat.py changes.