parameters: (
          self,
          f: Union[str, Path, BinaryIO],
          importer: Union[Importer, Sequence[Importer]] = sys_importer,
      )
docstring: Create an exporter.
  
          Args:
              f: The location to export to. Can be a  ``string``/``Path`` object containing a filename
                  or a binary I/O object.
              importer: If a single Importer is passed, use that to search for modules.
                  If a sequence of importers are passsed, an ``OrderedImporter`` will be constructed out of them.
docstring_summary: Create an exporter.
docstring_tokens: Create an exporter .
function: def __init__(
          self,
          f: Union[str, Path, BinaryIO],
          importer: Union[Importer, Sequence[Importer]] = sys_importer,
      ):
          """
          Create an exporter.
  
          Args:
              f: The location to export to. Can be a  ``string``/``Path`` object containing a filename
                  or a binary I/O object.
              importer: If a single Importer is passed, use that to search for modules.
                  If a sequence of importers are passsed, an ``OrderedImporter`` will be constructed out of them.
          """
          if isinstance(f, (Path, str)):
              f = str(f)
              self.buffer: Optional[BinaryIO] = None
          else:  # is a byte buffer
              self.buffer = f
  
          self.zip_file = torch._C.PyTorchFileWriter(f)
          self.zip_file.set_min_version(6)
          self._written_files: Set[str] = set()
  
          self.serialized_reduces: Dict[int, Any] = {}
  
          # A graph tracking all the modules and pickle objects added to this
          # package and the dependencies between them.
          # - Each node is a module name (or a pickle name that looks like '<foo.obj.pkl>')
          # - Each directed edge (u, v) means u depends on v.
          # - Nodes may contain metadata that describe how to write the thing to the zipfile.
          self.dependency_graph = DiGraph()
          self.script_module_serializer = torch._C.ScriptModuleSerializer(self.zip_file)
          self.storage_context = self.script_module_serializer.storage_context()
  
          # These are OrderedDicts for compatibility with RemovableHandle.
          # Generic OrderedDict type annotations are not present until 3.7.
          # The real type signature is OrderedDict[int, Callable[[PackageExporter, str], None]]
          self._extern_hooks: OrderedDict = OrderedDict()
          self._mock_hooks: OrderedDict = OrderedDict()
          self._intern_hooks: OrderedDict = OrderedDict()
  
          if isinstance(importer, Importer):
              self.importer = importer
          else:
              if not isinstance(importer, collections.abc.Sequence):
                  raise TypeError(
                      "importer arg should be an Importer or a sequence of Importers, "
                      f"got {type(importer)} instead."
                  )
              self.importer = OrderedImporter(*importer)
  
          self.patterns: Dict[GlobGroup, _PatternInfo] = {}
          self._unique_id = 0
function_tokens: def __init__ ( self , f : Union [ str , Path , BinaryIO ] , importer : Union [ Importer , Sequence [ Importer ] ] = sys_importer , ) : if isinstance ( f , ( Path , str ) ) : f = str ( f ) self . buffer : Optional [ BinaryIO ] = None else : # is a byte buffer self . buffer = f self . zip_file = torch . _C . PyTorchFileWriter ( f ) self . zip_file . set_min_version ( 6 ) self . _written_files : Set [ str ] = set ( ) self . serialized_reduces : Dict [ int , Any ] = { } # A graph tracking all the modules and pickle objects added to this # package and the dependencies between them. # - Each node is a module name (or a pickle name that looks like '<foo.obj.pkl>') # - Each directed edge (u, v) means u depends on v. # - Nodes may contain metadata that describe how to write the thing to the zipfile. self . dependency_graph = DiGraph ( ) self . script_module_serializer = torch . _C . ScriptModuleSerializer ( self . zip_file ) self . storage_context = self . script_module_serializer . storage_context ( ) # These are OrderedDicts for compatibility with RemovableHandle. # Generic OrderedDict type annotations are not present until 3.7. # The real type signature is OrderedDict[int, Callable[[PackageExporter, str], None]] self . _extern_hooks : OrderedDict = OrderedDict ( ) self . _mock_hooks : OrderedDict = OrderedDict ( ) self . _intern_hooks : OrderedDict = OrderedDict ( ) if isinstance ( importer , Importer ) : self . importer = importer else : if not isinstance ( importer , collections . abc . Sequence ) : raise TypeError ( "importer arg should be an Importer or a sequence of Importers, " f"got {type(importer)} instead." ) self . importer = OrderedImporter ( * importer ) self . patterns : Dict [ GlobGroup , _PatternInfo ] = { } self . _unique_id = 0