PyTorch Docstring Writing Guide This skill describes how to write docstrings for functions and methods in the PyTorch project, following the conventions in and . General Principles - Use raw strings ( ) for all docstrings to avoid issues with LaTeX/math backslashes - Follow Sphinx/reStructuredText (reST) format for documentation - Be concise but complete - include all essential information - Always include examples when possible - Use cross-references to related functions/classes Docstring Structure 1. Function Signature (First Line) Start with the function signature showing all parameters: N…