class_docstr: Estimate memory with chunk
class_docstr_tok: ["Estimate","memory","with","chunk"]
docstr: add an active node and its shape to active node dict
docstr_tok: ["add","an","active","node","and","its","shape","to","active","node","dict"]
code: def _add_active_node(
      self, n: Node, active_nodes: Dict, chunk_ratio: float
  ) -> None:
      """
      add an active node and its shape to active node dict
      """
      if get_node_shape(n) is None:
          return
      if n.op == "placeholder":
          return
      if n not in active_nodes:
          node_size = self._get_node_size(n) * chunk_ratio
          active_nodes[n] = node_size
  
file_path: colossalai/colossalai/autochunk/estimate_memory.py
imports: from typing import Dict, List
  import torch
  from torch.fx.node import Node
  from .utils import NodeMgr, get_node_shape, is_non_memory_node
label_desc: Use image node_id 3 for calling the EstimateMemory obj's underlying member method code with example usage: obj._add_active_node(n, active_nodes, chunk_ratio) without return types