code: def get_data_iters(batch_size):
      train_set, val_set = LabelList(
          ratio=opt.ratio, root=opt.dataset_root, name=opt.dataset
      )
  
      normalizer = transforms.Normalize(
          mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
      )
  
      transform_train = transforms.Compose(
          [
              transforms.Resize(
                  size=(opt.img_width, opt.img_height), interpolation=1
              ),
              transforms.RandomFlipLeftRight(),
              RandomCrop(
                  size=(opt.img_width, opt.img_height), pad=opt.pad
              ),
              transforms.ToTensor(),
              normalizer,
          ]
      )
  
      train_imgs = ImageTxtDataset(train_set, transform=transform_train)
      train_data = gluon.data.DataLoader(
          train_imgs,
          batch_size,
          shuffle=True,
          last_batch="discard",
          num_workers=opt.num_workers,
      )
  
      if opt.ratio < 1:
          transform_test = transforms.Compose(
              [
                  transforms.Resize(
                      size=(opt.img_width, opt.img_height),
                      interpolation=1,
                  ),
                  transforms.ToTensor(),
                  normalizer,
              ]
          )
  
          val_imgs = ImageTxtDataset(val_set, transform=transform_test)
          val_data = gluon.data.DataLoader(
              val_imgs,
              batch_size,
              shuffle=True,
              last_batch="discard",
              num_workers=opt.num_workers,
          )
      else:
          val_data = None
  
      return train_data, val_data
  
file_path: gluon-cv/scripts/re-id/baseline/train.py
imports: from __future__ import division
  import argparse, datetime, os
  import logging
  import mxnet
  from mxnet import gluon, nd
  from mxnet.gluon.model_zoo import vision
  from mxnet.gluon.data.vision import transforms
  from mxnet import autograd
  from networks import resnet18, resnet34, resnet50
  import gluoncv
  from gluoncv.data.market1501.data_read import ImageTxtDataset
  from gluoncv.data.market1501.label_read import LabelList
  from gluoncv.data.transforms.block import RandomCrop
label_desc: Use image node_id 1 for calling a global function with example usage: get_data_iters(batch_size) and returns: train_data,  val_data