Wrote docstring for monitor.py