class_docstr: FoldedGraphModule is a GraphModule which also contains another
  `const_subgraph_module` representing a subgraph which has all const attr
  inputs and which can be run once before running the main standard
  `graph`. The `const_output_names` are the ordered list names of attrs which
  represent what each respective output from the const_subgraph should be set
  on which attrs.
class_docstr_tok: ["FoldedGraphModule","is","a","GraphModule","which","also","contains","another","`","const_subgraph_module","`","representing","a","subgraph","which","has","all","const","attr","inputs","and","which","can","be","run","once","before","running","the","main","standard","`","graph","`",".","The","`","const_output_names","`","are","the","ordered","list","names","of","attrs","which","represent","what","each","respective","output","from","the","const_subgraph","should","be","set","on","which","attrs","."]
code: def __init__(
      self,
      root: torch.nn.Module,
      graph: torch.fx.Graph,
      const_subgraph: Optional[torch.fx.Graph] = None,
      fx_const_folded_attrs_name: Optional[str] = None,
      device_for_folded_attrs: str = "cuda",
  ):
      super().__init__(root, graph)
      self.const_subgraph_module = (
          None
          if const_subgraph is None
          else torch.fx.GraphModule(root, const_subgraph)
      )
      self.has_folding_been_run = False
      self.fx_const_folded_attrs_name = fx_const_folded_attrs_name
      self.device_for_folded_attrs = device_for_folded_attrs
  
file_path: pytorch/torch/fx/experimental/const_fold.py
imports: import re
  from typing import Callable, Dict, Optional, Set, Union
  import torch.fx
  from torch.fx.node import map_arg
  from torch.fx.passes.split_module import split_module
label_desc: Use image node_id 1 to create a new FoldedGraphModule object from inherited base classes: torch.fx with example: obj = FoldedGraphModule(root, graph, const_subgraph, fx_const_folded_attrs_name, device_for_folded_attrs)