Replace comments with docstrings