Repository: pytorch
Issue: Fix docstring errors in _torch_docs.py, serialization.py, overrides.py, _utils.py
Labels: module: docs,triaged,medium,docathon-h2-2023

Please fix the following issues. To test locally, run: 
 ```
pydocstyle path-to-file --count
```
Run this command before and after fixing the errors. This command prints out the number of errors at the end of the output. Paste the output to your PR description with the number before and after. 
- **File**: `torch/_torch_docs.py`, **Entity**: ``, **Line**: 2, **Description**: First line should end with a period (not 'C')
- **File**: `torch/_torch_docs.py`, **Entity**: `parse_kwargs`, **Line**: 11, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_torch_docs.py`, **Entity**: `parse_kwargs`, **Line**: 11, **Description**: Use r""" if any backslashes in a docstring
- **File**: `torch/_torch_docs.py`, **Entity**: `parse_kwargs`, **Line**: 11, **Description**: First line should be in imperative mood (perhaps 'Map', not 'Maps')
- **File**: `torch/_utils.py`, **Entity**: `_type`, **Line**: 12, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_type`, **Line**: 12, **Description**: First line should end with a period (not 'o')
- **File**: `torch/_utils.py`, **Entity**: `_type`, **Line**: 12, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/_utils.py`, **Entity**: `_hpu`, **Line**: 52, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/_utils.py`, **Entity**: `_cuda`, **Line**: 84, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/_utils.py`, **Entity**: `_accumulate`, **Line**: 471, **Description**: Use """triple double quotes""" (found "-quotes)
- **File**: `torch/_utils.py`, **Entity**: `_accumulate`, **Line**: 471, **Description**: First line should end with a period (not 's')
- **File**: `torch/_utils.py`, **Entity**: `_flatten_dense_tensors`, **Line**: 486, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_flatten_dense_tensors`, **Line**: 486, **Description**: First line should end with a period (not 'f')
- **File**: `torch/_utils.py`, **Entity**: `_flatten_sparse_tensors`, **Line**: 503, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_flatten_sparse_tensors`, **Line**: 503, **Description**: First line should end with a period (not 'd')
- **File**: `torch/_utils.py`, **Entity**: `_unflatten_dense_tensors`, **Line**: 523, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_unflatten_dense_tensors`, **Line**: 523, **Description**: First line should end with a period (not 'f')
- **File**: `torch/_utils.py`, **Entity**: `_unflatten_sparse_tensors`, **Line**: 539, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_unflatten_sparse_tensors`, **Line**: 539, **Description**: First line should end with a period (not 'f')
- **File**: `torch/_utils.py`, **Entity**: `_reorder_tensors_as`, **Line**: 567, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_reorder_tensors_as`, **Line**: 567, **Description**: First line should end with a period (not 'r')
- **File**: `torch/_utils.py`, **Entity**: `_take_tensors`, **Line**: 589, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_take_tensors`, **Line**: 589, **Description**: First line should end with a period (not ',')
- **File**: `torch/_utils.py`, **Entity**: `KeyErrorMessage`, **Line**: 657, **Description**: First line should end with a period (not 'r')
- **File**: `torch/_utils.py`, **Entity**: `ExceptionWrapper`, **Line**: 664, **Description**: First line should end with a period (not 's')
- **File**: `torch/_utils.py`, **Entity**: `reraise`, **Line**: 676, **Description**: First line should end with a period (not 'd')
- **File**: `torch/_utils.py`, **Entity**: `get_current_device_index`, **Line**: 741, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `get_current_device_index`, **Line**: 741, **Description**: First line should end with a period (not 'd')
- **File**: `torch/_utils.py`, **Entity**: `get_current_device_index`, **Line**: 741, **Description**: First line should be in imperative mood (perhaps 'Check', not 'Checks')
- **File**: `torch/_utils.py`, **Entity**: `_get_device_index`, **Line**: 754, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_get_device_index`, **Line**: 754, **Description**: First line should end with a period (not 'e')
- **File**: `torch/_utils.py`, **Entity**: `_get_device_index`, **Line**: 754, **Description**: First line should be in imperative mood (perhaps 'Get', not 'Gets')
- **File**: `torch/_utils.py`, **Entity**: `_handle_complex`, **Line**: 798, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/_utils.py`, **Entity**: `_handle_complex`, **Line**: 798, **Description**: First line should end with a period (not 'r')
- **File**: `torch/_utils.py`, **Entity**: `_handle_complex`, **Line**: 798, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/_utils.py`, **Entity**: `_element_size`, **Line**: 811, **Description**: One-line docstring should fit on one line with quotes (found 3)
- **File**: `torch/_utils.py`, **Entity**: `_element_size`, **Line**: 811, **Description**: First line should end with a period (not 's')
- **File**: `torch/_utils.py`, **Entity**: `_element_size`, **Line**: 811, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/overrides.py`, **Entity**: ``, **Line**: 1, **Description**: First line should end with a period (not '`')
- **File**: `torch/overrides.py`, **Entity**: `get_default_nowrap_functions`, **Line**: 325, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/overrides.py`, **Entity**: `get_default_nowrap_functions`, **Line**: 325, **Description**: First line should end with a period (not 'y')
- **File**: `torch/overrides.py`, **Entity**: `get_testing_overrides`, **Line**: 351, **Description**: First line should end with a period (not 's')
- **File**: `torch/overrides.py`, **Entity**: `wrap_torch_function`, **Line**: 1412, **Description**: First line should be in imperative mood (perhaps 'Wrap', not 'Wraps')
- **File**: `torch/overrides.py`, **Entity**: `_get_overloaded_args`, **Line**: 1448, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/overrides.py`, **Entity**: `get_overridable_functions`, **Line**: 1716, **Description**: First line should end with a period (not '_')
- **File**: `torch/overrides.py`, **Entity**: `resolve_name`, **Line**: 1727, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/overrides.py`, **Entity**: `resolve_name`, **Line**: 1727, **Description**: First line should end with a period (not 'o')
- **File**: `torch/overrides.py`, **Entity**: `_get_tensor_methods`, **Line**: 1747, **Description**: No whitespaces allowed surrounding docstring text
- **File**: `torch/overrides.py`, **Entity**: `_get_tensor_methods`, **Line**: 1747, **Description**: First line should end with a period (not '`')
- **File**: `torch/overrides.py`, **Entity**: `_get_tensor_methods`, **Line**: 1747, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/overrides.py`, **Entity**: `is_tensor_method_or_property`, **Line**: 1753, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/overrides.py`, **Entity**: `is_tensor_method_or_property`, **Line**: 1753, **Description**: First line should end with a period (not 'a')
- **File**: `torch/overrides.py`, **Entity**: `is_tensor_method_or_property`, **Line**: 1753, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/overrides.py`, **Entity**: `is_tensor_like`, **Line**: 1777, **Description**: First line should be in imperative mood (perhaps 'Return', not 'Returns')
- **File**: `torch/overrides.py`, **Entity**: `TorchFunctionMode`, **Line**: 1813, **Description**: 1 blank line required after class docstring (found 0)
- **File**: `torch/overrides.py`, **Entity**: `TorchFunctionMode`, **Line**: 1813, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/overrides.py`, **Entity**: `TorchFunctionMode`, **Line**: 1813, **Description**: First line should end with a period (not 'l')
- **File**: `torch/serialization.py`, **Entity**: `check_module_version_greater_or_equal`, **Line**: 100, **Description**: Use """triple double quotes""" (found '''-quotes)
- **File**: `torch/serialization.py`, **Entity**: `check_module_version_greater_or_equal`, **Line**: 100, **Description**: First line should end with a period (not 's')
- **File**: `torch/serialization.py`, **Entity**: `_should_read_directly`, **Line**: 427, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/serialization.py`, **Entity**: `_should_read_directly`, **Line**: 427, **Description**: First line should end with a period (not 'd')
- **File**: `torch/serialization.py`, **Entity**: `_should_read_directly`, **Line**: 427, **Description**: First line should be in imperative mood (perhaps 'Check', not 'Checks')
- **File**: `torch/serialization.py`, **Entity**: `_check_dill_version`, **Line**: 462, **Description**: 1 blank line required between summary line and description (found 0)
- **File**: `torch/serialization.py`, **Entity**: `_check_dill_version`, **Line**: 462, **Description**: Use """triple double quotes""" (found '''-quotes)
- **File**: `torch/serialization.py`, **Entity**: `_check_dill_version`, **Line**: 462, **Description**: First line should be in imperative mood (perhaps 'Check', not 'Checks')
- **File**: `torch/serialization.py`, **Entity**: `save`, **Line**: 501, **Description**: No blank lines allowed before function docstring (found 1)
- **File**: `torch/serialization.py`, **Entity**: `save`, **Line**: 501, **Description**: First line should end with a period (not ')')
- **File**: `torch/serialization.py`, **Entity**: `save`, **Line**: 501, **Description**: First line should not be the function's "signature"
- **File**: `torch/serialization.py`, **Entity**: `load`, **Line**: 793, **Description**: No blank lines allowed before function docstring (found 1)
- **File**: `torch/serialization.py`, **Entity**: `load`, **Line**: 793, **Description**: First line should end with a period (not ')')
- **File**: `torch/serialization.py`, **Entity**: `load`, **Line**: 793, **Description**: First line should not be the function's "signature"
- **File**: `torch/serialization.py`, **Entity**: `_get_layout`, **Line**: 957, **Description**: One-line docstring should fit on one line with quotes (found 2)

cc @carljparker