Add stricter check for function schemas with varargs (#56509)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56509
Test Plan: Imported from OSS
Reviewed By: gmagogsfm
Differential Revision: D27889626
Pulled By: tugsbayasgalan
fbshipit-source-id: 5ff81a313ff53a9519d7dc9f3d6f7234d58af8e2