Refactoring the AO experimental sparsity tests
The tests are passing, and this diff refactors them to conform with the best practices.
Differential Revision: [D37316967](https://our.internmc.facebook.com/intern/diff/D37316967/)
**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D37316967/)!
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79972
Approved by: https://github.com/z-a-f