[Hackathon] Add error source range highlighting check in test_hash and test_list_dict (#55490)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55490
Test Plan: Imported from OSS
Reviewed By: pbelevich
Differential Revision: D27628697
Pulled By: tugsbayasgalan
fbshipit-source-id: 694226f0b083606f665569e6a84d547026c7f19f