Fix logic in TestFX.test_get_torch_func_signature_exhaustive (#54510)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54510
Test Plan: Imported from OSS
Reviewed By: ansley
Differential Revision: D27264670
Pulled By: jamesr66a
fbshipit-source-id: 0ef6395dacde3eb2a4b9c7eeff760a1be38b6dfe