fix errors about mypy check in torch/_inductor/compile_fx.py (#107508)
the `compile_fx.py` blocked the merging of [PR1 ](https://github.com/pytorch/pytorch/pull/107127)and [PR2](https://github.com/pytorch/pytorch/pull/107448)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107508
Approved by: https://github.com/ezyang