modify the signature of method `__getitem__` from `ModuleList` (#83799)
The type of the parameter idx can be either slice or int. The same for the `Sequential` class
Fixes #83797
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83799
Approved by: https://github.com/malfet, https://github.com/albanD
Author
Fabian Ricardo Latorre Gomez