[quant][graphmode][refactor] Separate preprocess step for insertObserver (#32813)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32813
We need to separate the step to make the logic more clear
and also to find all the values we want to skip in advance
without the interference of inserted observers
Test Plan:
.
Imported from OSS
Differential Revision: D20087841
fbshipit-source-id: ec3654ca561c0d4e2c05011988bb9ecc8671c5c2