code: def get_model_3d_descriptor(dir):
      file_list = get_files(dir)
      zero_file_list = get_zero_files(dir)
      num_pp0_files = len(
          get_files_with_prefix(file_list, f"{LAYER_FILE_PREFIX}01")
      )
      if num_pp0_files > 0:
          tp_degree = num_pp0_files
          pp_degree = (
              len(get_files_with_prefix(file_list, MODEL_FILE_PREFIX))
              // tp_degree
          )
          dp_degree = max(
              1, len(zero_file_list) // (pp_degree * tp_degree)
          )
      else:
          tp_degree = len(
              get_files_with_prefix(file_list, MODEL_FILE_PREFIX)
          )
          dp_degree = max(1, len(zero_file_list) // tp_degree)
          pp_degree = 1
  
      return model_3d_desc(pp_degree, tp_degree, dp_degree)
  
file_path: DeepSpeed/deepspeed/checkpoint/reshape_3d_utils.py
imports: from .reshape_utils import get_files, get_files_with_prefix, partition_data, get_zero_files
  from .constants import MODEL_FILE_PREFIX, LAYER_FILE_PREFIX
  from .reshape_meg_2d import reshape_meg_2d_parallel, meg_2d_parallel_map
label_desc: Use image node_id 1 for calling a global function with example usage: get_model_3d_descriptor(dir) and returns: model_3d_desc