Add a filter to remove mutation (#51923)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51923
Test Plan: Imported from OSS
Reviewed By: navahgar
Differential Revision: D26696700
Pulled By: eellison
fbshipit-source-id: 9665e9b786f55b6e5b98420eae19de262d46bb96