code: def next(self):
      if not self.is_init:
          self.reset()
          self.is_init = True
      """Returns the next batch of data."""
      # print('in next', self.cur, self.labelcur)
      self.nbatch += 1
      batch_size = self.batch_size
      c, h, w = self.data_shape
      batch_data = nd.empty((batch_size, c, h, w))
      if self.provide_label is not None:
          batch_label = nd.empty(self.provide_label[0][1])
      i = 0
      try:
          while i < batch_size:
              label, s, bbox, landmark = self.next_sample()
              _data = self.imdecode(s)
              if self.rand_mirror:
                  _rd = random.randint(0, 1)
                  if _rd == 1:
                      _data = mx.ndarray.flip(data=_data, axis=1)
              if self.cutoff > 0:
                  centerh = random.randint(0, _data.shape[0] - 1)
                  centerw = random.randint(0, _data.shape[1] - 1)
                  half = self.cutoff // 2
                  starth = max(0, centerh - half)
                  endh = min(_data.shape[0], centerh + half)
                  startw = max(0, centerw - half)
                  endw = min(_data.shape[1], centerw + half)
                  _data = _data.astype("float32")
                  # print(starth, endh, startw, endw, _data.shape)
                  _data[starth:endh, startw:endw, :] = 127.5
              # _npdata = _data.asnumpy()
              # if landmark is not None:
              #  _npdata = face_preprocess.preprocess(_npdata, bbox = bbox, landmark=landmark, image_size=self.image_size)
              # if self.rand_mirror:
              #  _npdata = self.mirror_aug(_npdata)
              # if self.mean is not None:
              #  _npdata = _npdata.astype(np.float32)
              #  _npdata -= self.mean
              #  _npdata *= 0.0078125
              # nimg = np.zeros(_npdata.shape, dtype=np.float32)
              # nimg[self.patch[1]:self.patch[3],self.patch[0]:self.patch[2],:] = _npdata[self.patch[1]:self.patch[3], self.patch[0]:self.patch[2], :]
              # _data = mx.nd.array(nimg)
              data = [_data]
              try:
                  self.check_valid_image(data)
              except RuntimeError as e:
                  logging.debug("Invalid image, skipping:  %s", str(e))
                  continue
              # print('aa',data[0].shape)
              # data = self.augmentation_transform(data)
              # print('bb',data[0].shape)
              for datum in data:
                  assert (
                      i < batch_size
                  ), "Batch size must be multiples of augmenter output length"
                  # print(datum.shape)
                  batch_data[i][:] = self.postprocess_data(datum)
                  if self.provide_label is not None:
                      batch_label[i][:] = label
                  i += 1
      except StopIteration:
          if i < batch_size:
              raise StopIteration
  
      # print('next end', batch_size, i)
      _label = None
      if self.provide_label is not None:
          _label = [batch_label]
      return io.DataBatch([batch_data], _label, batch_size - i)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import random
  import logging
  import sys
  import numbers
  import math
  import sklearn
  import datetime
  import numpy
  import cv2
  import mxnet
  from mxnet import ndarray
  from mxnet import io
  from mxnet import recordio
  import face_preprocess
label_desc: Use image node_id 17 for calling the FaceImageIter obj's underlying member method code with example usage: obj.next() and returns: io