code: def _get_fit_chunk_size(self, chunk_region_dict, chunk_infos):
      chunk_size = 1
      reorder_chunk_info = chunk_region_dict["reorder_chunk_info"]
      reorder_chunk_info["chunk_size"] = chunk_size
      cur_chunk_max_mem = 0
      # search a region
      while cur_chunk_max_mem < self.max_memory:
          chunk_size *= 2
          reorder_chunk_info["chunk_size"] = chunk_size
          cur_chunk_infos = chunk_infos + [reorder_chunk_info]
          cur_mem_peak = (
              self.estimate_memory.estimate_chunk_inference_mem(
                  chunk_region_dict["reorder_node_list"],
                  cur_chunk_infos,
              )[0]
          )
          cur_chunk_max_mem = max(
              cur_mem_peak[
                  reorder_chunk_info["region"][0] : reorder_chunk_info[
                      "region"
                  ][1]
                  + 1
              ]
          )
      # search exact size
      chunk_info = chunk_region_dict["chunk_info"]
      chunk_info["chunk_size"] = self._chunk_size_binary_search(
          chunk_size // 2, chunk_size, chunk_region_dict, chunk_infos
      )
      return chunk_info
  
file_path: colossalai/colossalai/autochunk/select_chunk.py
imports: from .estimate_memory import EstimateMemory
  from .reorder_graph import ReorderGraph
  from .trace_indice import TraceIndice
  from .utils import NodeMgr, is_non_compute_node
label_desc: Use image node_id 4 for calling the SelectChunk obj's underlying member method code with example usage: obj._get_fit_chunk_size(chunk_region_dict, chunk_infos) and returns: chunk_info