code: def partition_data(data_list, num_partitions):
      num_elems = len(data_list)
      assert num_elems % num_partitions == 0
      partition_size = num_elems // num_partitions
      partitions_list = [
          data_list[i : i + partition_size]
          for i in range(0, num_elems, partition_size)
      ]
      return partitions_list
  
file_path: deepspeed/deepspeed/checkpoint/reshape_utils.py
imports: import os
  import torch
  from collections import OrderedDict
  from .constants import ZERO_FILE_PREFIX, FP16_ZERO_FILE_PREFIX, BF16_ZERO_FILE_PREFIX
label_desc: Use image node_id 6 for calling a global function with example usage: partition_data(data_list, num_partitions) and returns: partitions_list