Revert "Remove python key when setting functional tensor metadata (#81401)"
This reverts commit b0199c06f604dcfaf59bd59ecee9f638ef0e5c3f.
Reverted https://github.com/pytorch/pytorch/pull/81401 on behalf of https://github.com/clee2000 due to broke trunk win force_on_cpu tests https://github.com/pytorch/pytorch/runs/7329017706?check_suite_focus=true