code: def __init__(self, num_classes, data_shape, max_iter, dtype):
      self.batch_size = data_shape[0]
      self.cur_iter = 0
      self.max_iter = max_iter
      self.dtype = dtype
      label = np.random.randint(
          0,
          num_classes,
          [
              self.batch_size,
          ],
      )
      data = np.random.uniform(-1, 1, data_shape)
      self.data = mx.nd.array(
          data, dtype=self.dtype, ctx=mx.Context("cpu_pinned", -1)
      )
      self.label = mx.nd.array(
          label, dtype=self.dtype, ctx=mx.Context("cpu_pinned", -1)
      )
  
file_path: byteps/example/mxnet/common/data_byteps.py
imports: import mxnet
  import random
  from mxnet.io import DataBatch, DataIter
  import numpy
label_desc: Use image node_id 1 to create a new SyntheticDataIter object from inherited base classes: DataIter with example: obj = SyntheticDataIter(num_classes, data_shape, max_iter, dtype)