code: def _create_graph(
      f, args, *, aot_config: AOTConfig
  ) -> torch.fx.GraphModule:
      # FunctionalTensorMode must be enabled here.
      # See Note [Accessing .grad_fn on FunctionalTensor]
      with enable_python_dispatcher(), FunctionalTensorMode(
          aot_config.pre_dispatch
      ):
          fx_g = make_fx(
              f,
              decomposition_table=aot_config.decompositions,
              record_module_stack=True,
              pre_dispatch=aot_config.pre_dispatch,
          )(*args)
  
      return fx_g
  
file_path: pytorch/torch/_functorch/_aot_autograd/dispatch_and_compile_graph.py
imports: from typing import Any, Callable, List, Optional, Tuple, Union
  import torch
  import torch.utils._pytree
  import torch.utils.dlpack
  from torch import Tensor
  from torch._dispatch.python import enable_python_dispatcher
  from torch._dynamo.utils import lazy_format_graph_code
  from torch._logging import getArtifactLogger
  from torch._subclasses.functional_tensor import FunctionalTensorMode
  from torch.fx.experimental.proxy_tensor import make_fx
  from .functional_utils import assert_functional_graph
  from .schemas import AOTConfig, SubclassMeta, ViewAndMutationMeta
  from .traced_function_transforms import aot_dispatch_subclass, create_functionalized_fn, create_joint, fn_input_mutations_to_outputs, fn_prepped_for_autograd
label_desc: Use image node_id 1 for calling a global function with example usage: _create_graph(f, args) and returns: fx_g