[Pytorch] Add non mutator bundled inputs method (#58408)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58408
Itd be nice to have a version of bundle inputs that didnt mutate the original class/object. So now there is!
ghstack-source-id: 129127316
Test Plan: The new unittests
Reviewed By: dhruvbird
Differential Revision: D28460231
fbshipit-source-id: f6f7a19e264bddfaa177304cbde40336060a237a