Make {testing,debug_utils,utils}.py pass follow_imports typechecking (#113519)
Summary:
Notes:
* `debug_insert_nops` in testing.py was passing `None` to the compiler_fn
parameter of `OutputGraph`, hence the modifications there.
* I added `disable-error-code="method-assign"` to debug_utils.py as it
does several such assignments. I guess mypy doesn't like it because it
makes code near-impossible to safely typecheck.
X-link: https://github.com/pytorch/pytorch/pull/113519
Approved by: https://github.com/Skylion007
ghstack dependencies: #113413, #113518
Reviewed By: huydhn
Differential Revision: D51286997
Pulled By: int3
fbshipit-source-id: 47f11860806f18a5d1c99f4d780febf66e63689c