code: def get_compute_costs(node_list):
      num_nodes = len(node_list)
      all_compute_cost = np.full(
          (num_nodes, num_nodes), np.inf, dtype=np.float64
      )
  
      for start in tqdm.tqdm(
          range(num_nodes), desc="start pos", position=0
      ):
          for end in tqdm.tqdm(
              range(start, num_nodes),
              desc="end pos",
              position=1,
              leave=False,
          ):
              selected_flops = [
                  (node_list[i].fwd_flop + node_list[i].bwd_flop)
                  for i in range(start, end + 1)
              ]
              all_compute_cost[start, end] = sum(selected_flops)
  
      return all_compute_cost
  
file_path: ColossalAI/colossalai/fx/passes/adding_split_node_pass.py
imports: import numpy
  import torch
  import tqdm
  from colossalai.fx.passes.split_module import split_module
label_desc: Use image node_id 5 for calling a global function with example usage: get_compute_costs(node_list) and returns: all_compute_cost