class_docstr: Dataset to partition a given dataset.
  
  Partition a given `dataset`, according to the specified `partitions`. Use
  the method `select()` to select the current partition in use.
  
  The `partitions` is a dictionary where a key is a user-chosen string
  naming the partition, and value is a number representing the weight (as a
  number between 0 and 1) or the size (in number of samples) of the
  corresponding partition.
  
  Partioning is achieved linearly (no shuffling). See `ShuffleDataset` if you
  want to shuffle the dataset before partitioning.
  
  Args:
      dataset (Dataset): Dataset to be split.
      partitions (dict): Dictionary where key is a user-chosen string
          naming the partition, and value is a number representing the weight
          (as a number between 0 and 1) or the size (in number of samples)
          of the corresponding partition.
      initial_partition (str, optional): Initial parition to be selected.
code: def __getitem__(self, idx):
      super(MultiPartitionDataset, self).__getitem__(idx)
      try:
          if self.current_partition_idx == 0:
              return self.dataset[idx]
          else:
              offset = self.partition_cum_sizes[
                  self.current_partition_idx - 1
              ]
              return self.dataset[int(offset) + idx]
      except AttributeError:
          raise ValueError("Select a partition before accessing data.")
  
imports: from .dataset import Dataset
  import numpy
label_desc: Use image node_id 4 for calling the MultiPartitionDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: self, self