Add `RANGE_ITERATOR_MATCH` to properly guard on range iterators (#141902)
Summary:
A subsequeunt patch attempts to fix a side-effect issue for range
iterators, which in turn exposed an exising issue on guards for range
iterators -- the following test started failing:
```
PYTORCH_TEST_WITH_DYNAMO=1 python test/test_tensor_creation_ops.py TestTensorCreationCPU.test_hstack_column_stack_cpu_int16
```
This patch adds a `RANGE_ITERATOR_MATCH` guard to make sure that we
properly guard on range iterators, and adds a regression test.
X-link: https://github.com/pytorch/pytorch/pull/141902
Approved by: https://github.com/jansel
ghstack dependencies: #141713, #141714, #141715
Reviewed By: atalman
Differential Revision: D66729308
Pulled By: StrongerXi
fbshipit-source-id: 6a9515e8d21b3de67556405b8ca492b24bb53ad2