docstr: Helper function for reading in next sample.
docstr_tok: ["Helper","function","for","reading","in","next","sample","."]
code: def next_sample(self):
      """Helper function for reading in next sample."""
      if self.cur >= len(self.seq):
          raise StopIteration
      idx = self.seq[self.cur]
      self.cur += 1
      s = self.imgrec.read_idx(idx)
      header, img = recordio.unpack(s)
      img = mx.image.imdecode(img).asnumpy()
      hlabel = np.array(header.label).reshape((self.num_classes, 2))
      if not config.label_xfirst:
          hlabel = hlabel[:, ::-1]  # convert to X/W first
      annot = {"scale": config.base_scale}
  
      # ul = np.array( (50000,50000), dtype=np.int32)
      # br = np.array( (0,0), dtype=np.int32)
      # for i in range(hlabel.shape[0]):
      #  h = int(hlabel[i][0])
      #  w = int(hlabel[i][1])
      #  key = np.array((h,w))
      #  ul = np.minimum(key, ul)
      #  br = np.maximum(key, br)
  
      return img, hlabel, annot
  
imports: import mxnet
  import numpy
  import sys, os
  import random
  import math
  import scipy.misc
  import cv2
  import logging
  import sklearn
  import datetime
  import img_helper
  from mxnet.io import DataIter
  from mxnet import ndarray
  from mxnet import io
  from mxnet import recordio
  from PIL import Image
  from config import config
  from skimage import transform
label_desc: Use image node_id 6 for calling the FaceSegIter obj's underlying member method code with example usage: obj.next_sample() and returns: img,  hlabel,  annot