Add documentation to code
Generate docstrings and comments in your project's style.
Add documentation to this code using [docstring style, e.g. Google style, JSDoc]. ```[language] [paste code] ``` Document each function's purpose, parameters, return value, and errors raised. Add comments only where the logic isn't obvious. Don't change the code itself.
How to use it
Check that the documentation matches what the code actually does.