Revert "[pytree] add function `tree_iter` (#120155)"
This reverts commit 372d078f361e726bb4ac0884ac334b04c58179ef.
Reverted https://github.com/pytorch/pytorch/pull/120155 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/120155#issuecomment-1955479765))