Update Typeguard to TypeIs for better type inference (#133814)
Summary:
Uses TypeIs instead of TypeGuard for better inference. See https://peps.python.org/pep-0742/
X-link: https://github.com/pytorch/pytorch/pull/133814
Approved by: https://github.com/ezyang
Reviewed By: wdvr
Differential Revision: D65030974
fbshipit-source-id: 6e04f555c9ac4a60d7f53ab23ad3b60b82de5d48