code: def get_data(name, batch):
      isTrain = name == "train"
  
      if isTrain:
          augmentors = [
              # use lighter augs if model is too small
              imgaug.GoogleNetRandomCropAndResize(
                  crop_area_fraction=(
                      0.49 if args.ratio < 1 else 0.08,
                      1.0,
                  )
              ),
              imgaug.RandomOrderAug(
                  [
                      imgaug.BrightnessScale((0.6, 1.4), clip=False),
                      imgaug.Contrast((0.6, 1.4), clip=False),
                      imgaug.Saturation(0.4, rgb=False),
                      # rgb-bgr conversion for the constants copied from fb.resnet.torch
                      imgaug.Lighting(
                          0.1,
                          eigval=np.asarray(
                              [0.2175, 0.0188, 0.0045][::-1]
                          )
                          * 255.0,
                          eigvec=np.array(
                              [
                                  [-0.5675, 0.7192, 0.4009],
                                  [-0.5808, -0.0045, -0.8140],
                                  [-0.5836, -0.6948, 0.4203],
                              ],
                              dtype="float32",
                          )[::-1, ::-1],
                      ),
                  ]
              ),
              imgaug.Flip(horiz=True),
          ]
      else:
          augmentors = [
              imgaug.ResizeShortestEdge(256, cv2.INTER_CUBIC),
              imgaug.CenterCrop((224, 224)),
          ]
      return get_imagenet_dataflow(args.data, name, batch, augmentors)
  
imports: import argparse
  import math
  import numpy
  import os
  import cv2
  from tensorpack import tfv1
  from tensorpack import *
  from tensorpack.dataflow import imgaug
  from tensorpack.tfutils import argscope, SmartInit, model_utils
  from tensorpack.tfutils.scope_utils import under_name_scope
  from tensorpack.utils import logger
  from tensorpack.utils.gpu import get_num_gpu
  from imagenet_utils import ImageNetModel, eval_classification, get_imagenet_dataflow
label_desc: Use image node_id 6 for calling a global function with example usage: get_data(name, batch) and returns: get_imagenet_dataflow