class_docstr: Importers allow you to load code written to packages by :class:`PackageExporter`.
  Code is loaded in a hermetic way, using files from the package
  rather than the normal python import system. This allows
  for the packaging of PyTorch model code and data so that it can be run
  on a server or used in the future for transfer learning.
  
  The importer for packages ensures that code in the module can only be loaded from
  within the package, except for modules explicitly listed as external during export.
  The file ``extern_modules`` in the zip archive lists all the modules that a package externally depends on.
  This prevents "implicit" dependencies where the package runs locally because it is importing
  a locally-installed package, but then fails when the package is copied to another machine.
class_docstr_tok: ["Importers","allow","you","to","load","code","written","to","packages","by",":","class",":","`","PackageExporter","`",".","Code","is","loaded","in","a","hermetic","way",",","using","files","from","the","package","rather","than","the","normal","python","import","system",".","This","allows","for","the","packaging","of","PyTorch","model","code","and","data","so","that","it","can","be","run","on","a","server","or","used","in","the","future","for","transfer","learning",".","The","importer","for","packages","ensures","that","code","in","the","module","can","only","be","loaded","from","within","the","package",",","except","for","modules","explicitly","listed","as","external","during","export",".","The","file","``","extern_modules","``","in","the","zip","archive","lists","all","the","modules","that","a","package","externally","depends","on",".","This","prevents","``","implicit","''","dependencies","where","the","package","runs","locally","because","it","is","importing","a","locally-installed","package",",","but","then","fails","when","the","package","is","copied","to","another","machine","."]
docstr: Returns internal identifier that torch.package uses to distinguish :class:`PackageImporter` instances.
  Looks like::
  
      <torch_package_0>
code: def id(self):
      """
      Returns internal identifier that torch.package uses to distinguish :class:`PackageImporter` instances.
      Looks like::
  
          <torch_package_0>
      """
      return self._mangler.parent_name()
  
imports: import builtins
  import importlib
  import importlib.machinery
  import inspect
  import io
  import linecache
  import os
  import types
  from contextlib import contextmanager
  from typing import Any, BinaryIO, Callable, cast, Dict, Iterable, List, Optional, Union
  from weakref import WeakValueDictionary
  import torch
  from torch.serialization import _get_restore_location, _maybe_decode_ascii
  from ._directory_reader import DirectoryReader
  from ._importlib import _calc___package__, _normalize_line_endings, _normalize_path, _resolve_name, _sanity_check
  from ._mangling import demangle, PackageMangler
  from ._package_unpickler import PackageUnpickler
  from .file_structure_representation import _create_directory_from_file_list, Directory
  from .glob_group import GlobPattern
  from .importer import Importer
label_desc: Use image node_id 6 for calling the PackageImporter obj's underlying member method code with example usage: obj.id() and returns: self