code: def __init__(self, dir):
      basic_folder_validation(dir)
      self.dir = dir
      self.file_list = get_zero_files(dir)
      self.num_files = len(self.file_list)
      assert self.num_files > 0, f"No ZeRO files found in {dir}"
  
      self.src_3d = get_model_3d_descriptor(dir)
      self.target_3d = model_3d_desc(
          pp_degree=self.src_3d.pp_degree,
          tp_degree=self.src_3d.tp_degree,
          dp_degree=self.src_3d.dp_degree,
      )
      self._3d_file_map = self.src_3d.reshape(self.target_3d)
  
imports: import torch
  from .constants import BASE_OPTIMIZER_STATE, GROUP_PADDINGS, OPTIMIZER_STATE_DICT, PARTITION_COUNT
  from .reshape_utils import basic_folder_validation, get_zero_files, merge_state
  from .reshape_3d_utils import model_3d_desc, get_model_3d_descriptor
label_desc: Use image node_id 1 to create a new ZeROCheckpoint object from inherited base classes: object with example: obj = ZeROCheckpoint(dir)