Use SerializedPyObj in PythonRpcHandler::generatePythonUDFResult (#34495)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/34495
Differential Revision: D20347466
Test Plan: Imported from OSS
Pulled By: mrshenli
fbshipit-source-id: 79625adb4ac3c9c6da4f40016e973bf17466c693