#2 Refine the book.py code.