docstr: Tests individual function list import by comparing the functions
  and their hashes.
docstr_tok: ["Tests","individual","function","list","import","by","comparing","the","functions","and","their","hashes","."]
code: def _test_dict_import(
      self,
      package_name: str,
      dict_list: List[str],
      base: Optional[str] = None,
  ):
      r"""Tests individual function list import by comparing the functions
      and their hashes."""
      if base is None:
          base = "quantization"
      old_base = "torch." + base
      new_base = "torch.ao." + base
      old_location = importlib.import_module(
          f"{old_base}.{package_name}"
      )
      new_location = importlib.import_module(
          f"{new_base}.{package_name}"
      )
      for dict_name in dict_list:
          old_dict = getattr(old_location, dict_name)
          new_dict = getattr(new_location, dict_name)
          assert old_dict == new_dict, f"Dicts don't match: {dict_name}"
          for key in new_dict.keys():
              assert (
                  old_dict[key] == new_dict[key]
              ), f"Dicts don't match: {dict_name} for key {key}"
  
imports: from torch.testing._internal.common_utils import TestCase
  import importlib
  from typing import List, Optional
label_desc: Use image node_id 2 for calling the AOMigrationTestCase obj's underlying member method code with example usage: obj._test_dict_import(package_name, dict_list, base) without return types