Rearrange these story beats to see how Audrey and Mai realized the importance of a function’s signature and purpose statement (docstring).
Mai calls update_rating(None, "Hey Jude", 5) and the code crashes.
---
Audrey exclaims, “But I knew never to pass None! I never wrote that
down though...”
---
Mai tries setting rating to 10, breaking assumptions about the valid
range of [1..5].
---
Together, they realize they need a docstring specifying library
cannot be None and rating must be in [1..5].
---
They add a method signature with type hints and a Raises ValueError
note if constraints are violated.