code: def test_image_bbox_iter(self):
      im_list = [_generate_objects() + [x] for x in self.IMAGES]
      det_iter = mx.gluon.contrib.data.vision.ImageBboxDataLoader(
          2, (3, 300, 300), imglist=im_list, path_root=""
      )
      for _ in range(3):
          for _ in det_iter:
              pass
      val_iter = mx.gluon.contrib.data.vision.ImageBboxDataLoader(
          2, (3, 300, 300), imglist=im_list, path_root=""
      )
  
      # test batch_size is not divisible by number of images
      det_iter = mx.gluon.contrib.data.vision.ImageBboxDataLoader(
          4, (3, 300, 300), imglist=im_list, path_root=""
      )
      for _ in det_iter:
          pass
  
      # test file list with last batch handle
      os.makedirs("./data", exist_ok=True)
      fname = "./data/test_imagedetiter.lst"
      im_list = [
          [k] + _generate_objects() + [x]
          for k, x in enumerate(self.IMAGES)
      ]
      with open(fname, "w") as f:
          for line in im_list:
              line = "\t".join([str(k) for k in line])
              f.write(line + "\n")
  
      imageiter_list = [
          mx.gluon.contrib.data.vision.ImageBboxDataLoader(
              2, (3, 400, 400), path_imglist=fname, path_root=""
          ),
          mx.gluon.contrib.data.vision.ImageBboxDataLoader(
              3,
              (3, 400, 400),
              path_imglist=fname,
              path_root="",
              last_batch="discard",
          ),
          mx.gluon.contrib.data.vision.ImageBboxDataLoader(
              3,
              (3, 400, 400),
              path_imglist=fname,
              path_root="",
              last_batch="keep",
          ),
          mx.gluon.contrib.data.vision.ImageBboxDataLoader(
              3,
              (3, 400, 400),
              path_imglist=fname,
              path_root="",
              last_batch="rollover",
          ),
          mx.gluon.contrib.data.vision.ImageBboxDataLoader(
              3,
              (3, 400, 400),
              shuffle=True,
              path_imglist=fname,
              path_root="",
              last_batch="keep",
          ),
      ]
  
file_path: mxnet/tests/python/unittest/test_contrib_gluon_data_vision.py
imports: import mxnet
  import numpy
  import scipy.ndimage
  from mxnet.test_utils import *
  import shutil
  import tempfile
  import unittest
label_desc: Use image node_id 4 for calling the TestImage obj's underlying member method code with example usage: obj.test_image_bbox_iter() without return types