Only require python print on certain namespaces (#18846)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18846
ghimport-source-id: b211e15d24c88fdc32d79222d9fce2fa9c291541
Differential Revision: D14901485
Pulled By: bwasti
fbshipit-source-id: 4b02a66d325ba5391d1f838055aea13b5e4f6485