[LTC] Sync gen_lazy_tensor.py from the staging branch (#70385)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70385
This commit sync gen_lazy_tensor.py from the lazy_tensor_staging branch
to the master.
Test Plan: CI in the lazy_tensor_staging branch.
Reviewed By: wconstab
Differential Revision: D33306232
Pulled By: alanwaketan
fbshipit-source-id: a15c72b22418637f851a6cd4901a9f5c4be75449