class_docstr: Helper class to create data partitions 
class_docstr_tok: ["Helper","class","to","create","data","partitions"]
code: def __init__(self, data, sizes=[0.7, 0.2, 0.1], seed=1234):
      self.data = data
      self.partitions = []
      rng = random
      rng.seed(seed)
      data_len = len(data)
      indexes = [x for x in range(0, data_len)]
      rng.shuffle(indexes)
  
      for frac in sizes:
          part_len = int(frac * data_len)
          self.partitions.append(indexes[0:part_len])
          indexes = indexes[part_len:]
  
imports: import math
  import random
  import time
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  import torch.optim
  import torchvision.datasets
  import torchvision.transforms
  import fiber
  from fiber.experimental import Ring
label_desc: Use image node_id 1 to create a new DataPartitioner object  with example: obj = DataPartitioner(data, sizes, seed)