code: def _preprocess_graph(nodes: List[Node]):
      """
      This method is used to extract all the placeholders with sharding information,
      and mapping the nodes into the index of the origin graph.
      """
      # mapping the node into the origin graph index
      node_to_index_dict = {}
      index = 0
      for node in nodes:
          if node.target == "sharding_spec_convert_dict":
              input_dict_node = node
              continue
          if node.target == "origin_node_sharding_spec_dict":
              origin_dict_node = node
              continue
          if node.target == "comm_actions_dict":
              comm_actions_dict_node = node
              continue
          if not hasattr(node, "best_strategy"):
              continue
          node_to_index_dict[node] = index
          index += 1
  
      return (
          input_dict_node,
          origin_dict_node,
          comm_actions_dict_node,
          node_to_index_dict,
      )
  
file_path: ColossalAI/colossalai/auto_parallel/passes/runtime_apply_pass.py
imports: from typing import Dict, List
  import torch
  from torch.fx.node import Node
  from colossalai._analyzer.fx.node_util import MetaInfo
  from colossalai.auto_parallel.tensor_shard.sharding_strategy import CommType, OperationDataType
  from colossalai.tensor.comm_spec import CommSpec
  from colossalai.tensor.shape_consistency import ShapeConsistencyManager
  from colossalai.tensor.sharding_spec import ShardingSpec
label_desc: Use image node_id 4 for calling a global function with example usage: _preprocess_graph(nodes) and returns: input_dict_node,  origin_dict_node,  comm_actions_dict_node,  node_to_index_dict