code: def test_image_list_dataset_handle(prepare_record):
      root = os.path.join(
          os.path.dirname(prepare_record), "test_images"
      )
      imlist = os.listdir(root)
      imglist = [(0, path) for i, path in enumerate(imlist)]
      dataset = gluon.data.vision.ImageListDataset(
          root=root, imglist=imglist
      ).__mx_handle__()
      assert len(dataset) == 16, len(dataset)
      img, label = dataset[0]
      assert len(img.shape) == 3
      assert label == 0
  
      # save to file as *.lst
      imglist = [
          "\t".join((str(i), "0", path))
          for i, path in enumerate(imlist)
      ]
      with tempfile.NamedTemporaryFile("wt", delete=False) as fp:
          for line in imglist:
              fp.write(line + "\n")
          fp.close()
  
          dataset = gluon.data.vision.ImageListDataset(
              root=root, imglist=fp.name
          ).__mx_handle__()
          assert len(dataset) == 16
          img, label = dataset[0]
          assert len(img.shape) == 3
          assert label == 0
  
imports: import os
  import tarfile
  import tempfile
  import unittest
  import mxnet
  import numpy
  import random
  from mxnet import gluon
  import platform
  from mxnet.gluon.data import DataLoader
  import mxnet.ndarray
  from mxnet import context
  from mxnet.gluon.data.dataset import Dataset
  from mxnet.gluon.data.dataset import ArrayDataset
  import pytest
label_desc: Use image node_id 14 for calling a global function with example usage: test_image_list_dataset_handle(prepare_record) without return types