code: def load(
      f: Union[str, os.PathLike, io.BytesIO],
      *,
      extra_files: Optional[Dict[str, Any]] = None,
      expected_opset_version: Optional[Dict[str, int]] = None,
  ) -> ExportedProgram:
      """
  
      .. warning::
          Under active development, saved files may not be usable in newer versions
          of PyTorch.
  
      Loads an :class:`ExportedProgram` previously saved with
      :func:`torch.export.save <torch.export.save>`.
  
      Args:
          ep (ExportedProgram): The exported program to save.
  
          f (Union[str, os.PathLike, io.BytesIO): A file-like object (has to
           implement write and flush) or a string containing a file name.
  
          extra_files (Optional[Dict[str, Any]]): The extra filenames given in
           this map would be loaded and their content would be stored in the
           provided map.
  
          expected_opset_version (Optional[Dict[str, int]]): A map of opset names
           to expected opset versions
  
      Returns:
          An :class:`ExportedProgram` object
  
      Example::
  
          import torch
          import io
  
          # Load ExportedProgram from file
          ep = torch.export.load('exported_program.pt2')
  
          # Load ExportedProgram from io.BytesIO object
          with open('exported_program.pt2', 'rb') as f:
              buffer = io.BytesIO(f.read())
          buffer.seek(0)
          ep = torch.export.load(buffer)
  
          # Load with extra files.
          extra_files = {'foo.txt': ''}  # values will be replaced with data
          ep = torch.export.load('exported_program.pt2', extra_files=extra_files)
          print(extra_files['foo.txt'])
          print(ep(torch.randn(5)))
      """
      from torch._export import load
  
      return load(
          f,
          extra_files=extra_files,
          expected_opset_version=expected_opset_version,
      )
  
imports: import builtins
  import copy
  import dataclasses
  import inspect
  import io
  import os
  import sys
  import typing
  import warnings
  from enum import auto, Enum
  from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, TYPE_CHECKING, Union
  import torch
  import torch.fx._pytree
  import torch.utils._pytree
  from torch.fx._compatibility import compatibility
  from torch.fx.passes.infra.pass_base import PassResult
  from torch.fx.passes.infra.pass_manager import PassManager
  from torch.utils._pytree import FlattenFunc, FromDumpableContextFn, ToDumpableContextFn, UnflattenFunc
  from .dynamic_shapes import Constraint, Dim, dims, dynamic_dim
  from .exported_program import ExportedProgram, ModuleCallEntry, ModuleCallSignature
  from .graph_signature import ExportBackwardSignature, ExportGraphSignature
  from .unflatten import FlatArgsAdapter, unflatten, UnflattenedModule
label_desc: Use image node_id 3 for calling a global function with example usage: load(f) and returns: load