code: def _create_stateful_graph_module(
      plain_graph_module: torch.fx.GraphModule,
      range_constraints,
  ):
      stateful_gm = _StatefulGraphModule._create(
          plain_graph_module,
          plain_graph_module.graph,
          range_constraints=range_constraints,
      )
      stateful_gm.register_forward_pre_hook(
          _check_input_constraints_pre_hook, with_kwargs=True
      )
      return stateful_gm
  
file_path: pytorch/torch/export/_unlift.py
imports: import copy
  import torch
  import torch.utils._pytree
  from torch._export.utils import _check_input_constraints_pre_hook
  from torch.fx.graph import _PyTreeCodeGen, _PyTreeInfo
  from .exported_program import ExportedProgram
label_desc: Use image node_id 3 for calling a global function with example usage: _create_stateful_graph_module(plain_graph_module, range_constraints) and returns: stateful_gm