code: def __init__(
      self,
      batch_size,
      per_batch_size=0,
      path_imgrec=None,
      aug_level=0,
      force_mirror=False,
      exf=1,
      use_coherent=0,
      args=None,
      data_name="data",
      label_name="softmax_label",
  ):
      self.aug_level = aug_level
      self.force_mirror = force_mirror
      self.use_coherent = use_coherent
      self.exf = exf
      self.batch_size = batch_size
      self.per_batch_size = per_batch_size
      self.data_name = data_name
      self.label_name = label_name
      assert path_imgrec
      logging.info("loading recordio %s...", path_imgrec)
      path_imgidx = path_imgrec[0:-4] + ".idx"
      self.imgrec = mx.recordio.MXIndexedRecordIO(
          path_imgidx, path_imgrec, "r"
      )  # pylint: disable=redefined-variable-type
      self.oseq = list(self.imgrec.keys)
      print("train size", len(self.oseq))
      self.cur = 0
      self.reset()
      self.data_shape = (
          3,
          config.input_img_size,
          config.input_img_size,
      )
      self.num_classes = config.num_classes
      self.input_img_size = config.input_img_size
      # self.label_classes = self.num_classes
      if config.losstype == "heatmap":
          if aug_level > 0:
              self.output_label_size = config.output_label_size
              self.label_shape = (
                  self.num_classes,
                  self.output_label_size,
                  self.output_label_size,
              )
          else:
              self.output_label_size = self.input_img_size
              # self.label_shape = (self.num_classes, 2)
              self.label_shape = (
                  self.num_classes,
                  self.output_label_size,
                  self.output_label_size,
              )
      else:
          if aug_level > 0:
              self.output_label_size = config.output_label_size
              self.label_shape = (self.num_classes, 2)
          else:
              self.output_label_size = self.input_img_size
              # self.label_shape = (self.num_classes, 2)
              self.label_shape = (self.num_classes, 2)
      self.provide_data = [(data_name, (batch_size,) + self.data_shape)]
      self.provide_label = [
          (label_name, (batch_size,) + self.label_shape)
      ]
      self.img_num = 0
      self.invalid_num = 0
      self.mode = 1
      self.vis = 0
      self.stats = [0, 0]
      self.flip_order = [
          16,
          15,
          14,
          13,
          12,
          11,
          10,
          9,
          8,
          7,
          6,
          5,
          4,
          3,
          2,
          1,
          0,
          26,
          25,
          24,
          23,
          22,
          21,
          20,
          19,
          18,
          17,
          27,
          28,
          29,
          30,
          35,
          34,
          33,
          32,
          31,
          45,
          44,
          43,
          42,
          47,
          46,
          39,
          38,
          37,
          36,
          41,
          40,
          54,
          53,
          52,
          51,
          50,
          49,
          48,
          59,
          58,
          57,
          56,
          55,
          64,
          63,
          62,
          61,
          60,
          67,
          66,
          65,
      ]
  
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 1 to create a new FaceSegIter object from inherited base classes: DataIter with example: obj = FaceSegIter(batch_size, per_batch_size, path_imgrec, aug_level, force_mirror, exf, use_coherent, args, data_name, label_name)