code: def get_merge_state_dicts(self, mp_world_size, mp_rank):
      num_ckpt = len(self.ckpt_list)
      assert (
          num_ckpt % mp_world_size == 0
      ), "Invalid checkpoints and world size for sd merge"
  
      num_to_merge = num_ckpt // mp_world_size
      ckpt_list = [
          self.ckpt_list[i]
          for i in range(
              num_to_merge * mp_rank, num_to_merge * (mp_rank + 1)
          )
      ]
  
      logger.info(f"mp_rank: {mp_rank}, ckpt_list: {ckpt_list}")
      sd_list = [
          self.checkpoint_engine.load(
              ckpt, map_location=lambda storage, loc: storage
          )
          for ckpt in ckpt_list
      ]
      return sd_list
  
imports: import torch
  import os
  import copy
  import collections
  import json
  from abc import ABC, abstractmethod
  from deepspeed.utils import logger
  from deepspeed.runtime.checkpoint_engine.torch_checkpoint_engine import TorchCheckpointEngine
  from .weight_quantizer import WeightQuantization
label_desc: Use image node_id 3 for calling the SDLoaderBase obj's underlying member method code with example usage: obj.get_merge_state_dicts(mp_world_size, mp_rank) and returns: sd_list