Update library.py

Adding comments