class_docstr: Generates a FX GraphModule using torch.export API
  Args:
      aten_graph: If True, exports a graph with ATen operators.
                  If False, exports a graph with Python operators.
code: def pre_export_passes(
      self,
      options: exporter.ResolvedExportOptions,
      original_model: Union[torch.nn.Module, Callable],
      fx_module: torch.fx.GraphModule,
      fx_module_args: Sequence[Any],
  ):
      # TODO: Import here to prevent circular dependency
      from torch.onnx._internal.fx import analysis, passes
  
      diagnostic_context = options.diagnostic_context
  
      # ONNX does not support concept of (implicit) type promotion.
      # Insert type casts explicitly where needed.
      fx_module = passes.InsertTypePromotion(
          diagnostic_context, fx_module
      ).run()
  
      analysis.UnsupportedFxNodesAnalysis(
          diagnostic_context, fx_module, options.onnxfunction_dispatcher
      ).analyze(infra.levels.ERROR)
  
      # TODO: Disabled this pass until "Segmentation fault (core dumped)" is fixed
      # This operation should be invoked as the last pre export pass.
      # See [NOTE: Modularize pass ordering]
      # fx_module = passes.Modularize(diagnostic_context, fx_module).run()
  
      return fx_module
  
file_path: pytorch/torch/onnx/_internal/fx/torch_export_graph_extractor.py
imports: from __future__ import annotations
  from typing import Any, Callable, Mapping, Optional, Sequence, TYPE_CHECKING, Union
  import torch._dynamo
  import torch.fx
  import torch.onnx
  from torch.onnx._internal import _beartype, exporter, io_adapter
  from torch.onnx._internal.diagnostics import infra
label_desc: Use image node_id 3 for calling the TorchExport obj's underlying member method code with example usage: obj.pre_export_passes(options, original_model, fx_module, fx_module_args) and returns: fx_module