class_docstr: Tests for one-off or random functionality. Try not to add to this!
class_docstr_tok: ["Tests","for","one-off","or","random","functionality",".","Try","not","to","add","to","this","!"]
docstr: Tests loading a package with a python version embdded
docstr_tok: ["Tests","loading","a","package","with","a","python","version","embdded"]
code: def test_load_python_version_from_package(self):
      """Tests loading a package with a python version embdded"""
      importer1 = PackageImporter(
          f"{Path(__file__).parent}/package_e/test_nn_module.pt"
      )
      self.assertEqual(importer1.python_version(), "3.9.7")
  
imports: import inspect
  import os
  import platform
  import sys
  from io import BytesIO
  from pathlib import Path
  from textwrap import dedent
  from unittest import skipIf
  from torch.package import is_from_package, PackageExporter, PackageImporter
  from torch.package.package_exporter import PackagingError
  from torch.testing._internal.common_utils import IS_FBCODE, IS_SANDCASTLE, run_tests, skipIfTorchDynamo
label_desc: Use image node_id 4 for calling the TestMisc obj's underlying member method code with example usage: obj.test_load_python_version_from_package() without return types