Use size in python list (#102538)
Resubmission of #101922
Description copied verbatim
Potentially fixes the second issue described in https://github.com/pytorch/pytorch/issues/87159.
In python_list.h, int64_t is used when diff_type is better suited. On 32 bit systems, int64_t isn't a proper signed size type, which may cause the compilation error described in https://github.com/pytorch/pytorch/issues/87159.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/102538
Approved by: https://github.com/albanD