Revert "Add support to traverse all python collection objects (#84079)"
This reverts commit e0f0c8e7b9acf6b821956acadbe79aaa0f6f0237.
Reverted https://github.com/pytorch/pytorch/pull/84079 on behalf of https://github.com/weiwangmeta due to Diff reverted internally