support torch._C._get_tracing_state in script
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23248
Test Plan: Imported from OSS
Differential Revision: D16466588
Pulled By: wanchaol
fbshipit-source-id: 3c3d5dec2cea2f9cb080eadaef457cc62ac3fbe0