Add ObserveHelper and remove some common function parameters (#26641)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26641
att
Test Plan:
python test/test_jit.py 'TestJit.test_insert_observers*'
Imported from OSS
Differential Revision: D17538668
fbshipit-source-id: 42d0b251b245337227f877e57611b50f392a6d7e