Improve error message when Proxy object is iterated (#58302)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/58302
Test Plan: Imported from OSS
Reviewed By: jamesr66a
Differential Revision: D28444030
Pulled By: ansley
fbshipit-source-id: ee29b0f7b2199f8590de4c5945b0d4ce59230ce2