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 __len__(self):
      try:
          return self.partition_sizes[self.current_partition_idx]
      except AttributeError:
          raise ValueError("Select a partition before accessing data.")
  
imports: from .dataset import Dataset
  import numpy
label_desc: Use image node_id 3 for calling the SplitDataset obj's underlying member method code with example usage: obj.__len__() and returns: self