[JIT] Fix return types of inputs/outputs method in Graph (#86349)
The C++ definition return `ArrayRef<Value*>` but in python binding it returns iterator instead: https://github.com/pytorch/pytorch/blob/d04889323e2bc0b7321b76e564292565c88b9a5e/torch/csrc/jit/python/python_ir.cpp#L631
I've had hard time with mypy and there is also fixed version of stubs in pytorch-pfn-extras for my project: https://github.com/pfnet/pytorch-pfn-extras/blob/beeab3f30381fd1ed313bc09d561c567482784a1/stubs/torch/_C/__init__.pyi#L458
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86349
Approved by: https://github.com/kit1980