class_docstr: Dataset-like object, but only access a subset of it. 
code: def __len__(self):
      return len(self.index)
  
imports: import os
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  import torch.optim
  import nni
  import logging
  from math import ceil
  from random import Random
  from torch.autograd import Variable
  from torchvision import datasets, transforms
label_desc: Use image node_id 2 for calling the Partition obj's underlying member method code with example usage: obj.__len__() and returns: len