class_docstr: Core save_* and loading API tests.
class_docstr_tok: ["Core","save_","*","and","loading","API","tests","."]
code: def test_save_module_binary(self):
      f = BytesIO()
      with PackageExporter(f) as he:
          import module_a
          import package_a
  
          he.save_module(module_a.__name__)
          he.save_module(package_a.__name__)
      f.seek(0)
      hi = PackageImporter(f)
      module_a_i = hi.import_module("module_a")
      self.assertEqual(module_a_i.result, "module_a")
      self.assertIsNot(module_a, module_a_i)
      package_a_i = hi.import_module("package_a")
      self.assertEqual(package_a_i.result, "package_a")
      self.assertIsNot(package_a_i, package_a)
  
file_path: pytorch/test/package/test_save_load.py
imports: import pickle
  from io import BytesIO
  from textwrap import dedent
  from torch.package import PackageExporter, PackageImporter, sys_importer
  from torch.testing._internal.common_utils import run_tests
  from pathlib import Path
label_desc: Use image node_id 6 for calling the TestSaveLoad obj's underlying member method code with example usage: obj.test_save_module_binary() without return types