class_docstr: Split the dataset into `num_parts` parts and sample from the part with
  index `part_index`
  
  Parameters
  ----------
  length: int
    Number of examples in the dataset
  num_parts: int
    Partition the data into multiple parts
  part_index: int
    The index of the part to read from
class_docstr_tok: ["Split","the","dataset","into","`","num_parts","`","parts","and","sample","from","the","part","with","index","`","part_index","`","Parameters","--","--","--","--","--","length",":","int","Number","of","examples","in","the","dataset","num_parts",":","int","Partition","the","data","into","multiple","parts","part_index",":","int","The","index","of","the","part","to","read","from"]
code: def __init__(self, length, num_parts=1, part_index=0):
      # Compute the length of each partition
      self.part_len = length // num_parts
      # Compute the start index for this partition
      self.start = self.part_len * part_index
      # Compute the end index for this partition
      self.end = self.start + self.part_len
  
file_path: mxnet/example/distributed_training/cifar10_kvstore_hvd.py
imports: import argparse
  import logging
  import time
  import random
  import types
  import warnings
  import numpy
  import mxnet
  from mxnet import autograd, gluon, kv, nd
  from mxnet.gluon.model_zoo import vision
label_desc: Use image node_id 1 to create a new SplitSampler object from inherited base classes: gluon.data.sampler with example: obj = SplitSampler(length, num_parts, part_index)