class_docstr: DAG class contains all the DAG nodes
code: def create_node(
      self,
      submodule_node: Node,
      input_nodes: List[Node],
      output_nodes: List[Node],
      logical_devices: List[int],
      size_bytes: int,
  ) -> None:
      node = DAGNode(
          submodule_node,
          input_nodes,
          output_nodes,
          logical_devices,
          size_bytes,
      )
      self.nodes.append(node)
  
imports: import operator
  from collections import deque
  from typing import Dict, List, Set, NamedTuple, Tuple, Deque
  import torch
  from torch.fx.passes.graph_manipulation import get_size_of_all_nodes
  from torch.fx.experimental.partitioner_utils import Partition, Device, PartitionerConfig, get_partition_to_latency_mapping, get_latency_of_partitioned_graph, NodeLatency, get_extra_size_of, PartitionMode
  from torch.fx.graph_module import GraphModule
  from torch.fx.node import Node, map_arg
  from torch.fx.passes.split_module import split_module
label_desc: Use image node_id 2 for calling the DAG obj's underlying member method code with example usage: obj.create_node(submodule_node, input_nodes, output_nodes, logical_devices, size_bytes) without return types