Small custom function refactor which doesn't change anything (#63433)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63433
Test Plan: Imported from OSS
Reviewed By: mruberry
Differential Revision: D30431970
Pulled By: albanD
fbshipit-source-id: 905fa4d2ddeca18005b1bcb13dd6f8a080327e7c