code: def partition_uniform(num_items, num_parts):
      parts = [0] * (num_parts + 1)
      # First check for the trivial edge case
      if num_items <= num_parts:
          for p in range(num_parts + 1):
              parts[p] = min(p, num_items)
          return parts
  
      chunksize = floor(num_items / num_parts)
      for p in range(num_parts):
          parts[p] = min(chunksize * p, num_items)
      parts[num_parts] = num_items
      return parts
  
imports: from collections.abc import Iterable
  from deepspeed.moe.utils import is_moe_param
  import os
  import psutil
  import gc
  from math import sqrt
  from math import floor
  from bisect import bisect_left
  import torch
  from torch import inf
  from deepspeed import comm
  from deepspeed.utils import groups, logger
  from deepspeed.runtime.constants import PIPE_REPLICATED
  from numpy import prod
label_desc: Use image node_id 15 for calling a global function with example usage: partition_uniform(num_items, num_parts) and returns: parts, parts