[jit] Removed a local function to check for dominators and used the one added to Node class (#60909)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/60909
Test Plan: Imported from OSS
Reviewed By: eellison
Differential Revision: D29441864
Pulled By: navahgar
fbshipit-source-id: 362bd462fa70256dd1f8b05756a76da0cb3d4b76