code: def __repr__(self, detailed: bool = True):
      output = [
          "Chunk Information:\n",
          "\tchunk size: {}, chunk dtype: {}, process group size: {}\n".format(
              self.chunk_size, self.dtype, self.pg_size
          ),
          "\t# of tensors: {}, utilized size: {}, utilized percentage: {:.2f}\n".format(
              self.num_tensors,
              self.utilized_size,
              self.utilized_size / self.chunk_size,
          ),
      ]
  
      def print_tensor(tensor, prefix=""):
          output.append(
              "{}shape: {}, dtype: {}, device: {}\n".format(
                  prefix, tensor.shape, tensor.dtype, tensor.device
              )
          )
  
      if self.chunk_temp is not None:
          output.append("\tchunk temp:\n")
          print_tensor(tensor=self.chunk_temp, prefix="\t\t")
  
      if (
          self.cuda_global_chunk is not None
          and self.cuda_global_chunk.storage().size() > 0
      ):
          output.append("\tchunk total:\n")
          print_tensor(tensor=self.cuda_global_chunk, prefix="\t\t")
  
      if self.cuda_shard is not None:
          output.append("\tcuda shard:\n")
          print_tensor(tensor=self.cuda_shard, prefix="\t\t")
  
      if self.cpu_shard is not None:
          output.append("\tcpu shard:\n")
          print_tensor(tensor=self.cpu_shard, prefix="\t\t")
  
      memory_info = self.memory_usage
      output.append(
          "\tmemory usage: cuda {}, cpu {}\n".format(
              memory_info["cuda"], memory_info["cpu"]
          )
      )
  
      if detailed:
          output.append("\ttensor state monitor:\n")
          for st in TensorState:
              output.append(
                  "\t\t# of {}: {}\n".format(
                      st, self.tensor_state_cnter[st]
                  )
              )
  
      return "".join(output)
  
imports: from dataclasses import dataclass
  from enum import Enum
  from typing import Dict, List, Optional
  import torch
  import torch.distributed
  from torch.distributed import ProcessGroup
  from colossalai.utils import get_current_device
  from colossalai.utils.device import IS_NPU_AVAILABLE
label_desc: Use image node_id 32 for calling the Chunk obj's underlying member method code with example usage: obj.__repr__(detailed) and returns: str