code: def __init__(self, nbatches, datasampler):
      self.nbatches = nbatches
      self.datasampler = datasampler
      self.batch = 0
  
imports: import os
  import ctypes
  import numpy
label_desc: Use image node_id 1 to create a new TrainDataSampler object from inherited base classes: object with example: obj = TrainDataSampler(nbatches, datasampler)