code: def _gen_chunk_slice_dim(
      chunk_dim: int, chunk_indice_name: str, shape: List
  ) -> str:
      """
      Generate chunk slice string, eg. [:, :, chunk_idx_name:chunk_idx_name + chunk_size, :]
  
      Args:
          chunk_dim (int)
          chunk_indice_name (str): chunk indice name
          shape (List): node shape
  
      Returns:
          new_shape (str): return slice
      """
      new_shape = "["
      for idx, _ in enumerate(shape):
          if idx == chunk_dim:
              new_shape += "%s:%s + chunk_size" % (
                  chunk_indice_name,
                  chunk_indice_name,
              )
          else:
              new_shape += ":"
          new_shape += ", "
      new_shape = new_shape[:-2] + "]"
      return new_shape
  
file_path: colossalai/colossalai/autochunk/autochunk_codegen.py
imports: from typing import Any, Callable, Dict, Iterable, List, Tuple
  import torch
  import colossalai
  from colossalai.fx._compatibility import is_compatible_with_meta
  from colossalai.fx.codegen.activation_checkpoint_codegen import CODEGEN_AVAILABLE
  from torch.fx.node import Argument, Node, _get_qualified_name, _type_repr, map_arg
  from .search_chunk import SearchChunk
  from .utils import delete_free_var_from_last_use, get_logger, get_node_name, get_node_shape
label_desc: Use image node_id 1 for calling a global function with example usage: _gen_chunk_slice_dim(chunk_dim, chunk_indice_name, shape) and returns: new_shape