code: def test_package_mangler(self):
      a = PackageMangler()
      b = PackageMangler()
      a_mangled = a.mangle("foo.bar")
      # Since `a` mangled this string, it should demangle properly.
      self.assertEqual(a.demangle(a_mangled), "foo.bar")
      # Since `b` did not mangle this string, demangling should leave it alone.
      self.assertEqual(b.demangle(a_mangled), a_mangled)
  
file_path: pytorch/test/package/test_mangling.py
imports: from io import BytesIO
  from torch.package import PackageExporter, PackageImporter
  from torch.package._mangling import demangle, get_mangle_prefix, is_mangled, PackageMangler
  from torch.testing._internal.common_utils import run_tests
label_desc: Use image node_id 10 for calling the TestMangling obj's underlying member method code with example usage: obj.test_package_mangler() without return types