ns for fx: make weights comparison work on N models (#52356)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/52356
Refactor the NS for FX compare weights API to be able to
work on N models and do arbitrary matching strategies.
We factor out a util which takes a model and a list of
nodes to extract weights for, with names to give the extracted
weights. The user can then call this util with a set
of nodes and names created in any way they want.
Test Plan:
```
python test/test_quantization.py TestFXNumericSuiteCoreAPIs
```
Imported from OSS
Reviewed By: raghuramank100
Differential Revision: D26487271
fbshipit-source-id: 0c2172a1b33d47565004a307aff14d205671add7