[package] Bring back save_source_file (#59962)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59962
This reverts commit 44b021d21b5681c105529881bdbaefb6d3e335f6.
Test Plan: Imported from OSS
Reviewed By: H-Huang
Differential Revision: D29113224
Pulled By: zhxchen17
fbshipit-source-id: 55d42acc421c5f4abbbad9d9ed4d32b615939463