Add support for CoreSWHID/ExtendedSWHID when building naive.Graph
naive.Graph is often used in tests, and allowing these two classes is very handy, as it avoids writing conversion boilerplate in these tests
Migrated from D7415 (view on Phabricator)