Have type_parser return const reference (#70477)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/70477
Test Plan: Sandcastle
Reviewed By: cccclai
Differential Revision: D33340030
fbshipit-source-id: b2a295b7c1c01e86971f6b9bbdd7d3718a2d3f0c