code: def get_data(train_or_test, cifar_classnum):
      isTrain = train_or_test == "train"
      if cifar_classnum == 10:
          ds = dataset.Cifar10(train_or_test)
      else:
          ds = dataset.Cifar100(train_or_test)
      if isTrain:
          augmentors = [
              imgaug.RandomCrop((30, 30)),
              imgaug.Flip(horiz=True),
              imgaug.Brightness(63),
              imgaug.Contrast((0.2, 1.8)),
              imgaug.MeanVarianceNormalize(all_channel=True),
          ]
      else:
          augmentors = [
              imgaug.CenterCrop((30, 30)),
              imgaug.MeanVarianceNormalize(all_channel=True),
          ]
      ds = AugmentImageComponent(ds, augmentors)
      ds = BatchData(ds, 128, remainder=not isTrain)
      if isTrain:
          ds = MultiProcessRunnerZMQ(ds, 5)
      return ds
  
file_path: tensorpack/examples/basics/cifar-convnet.py
imports: import argparse
  import os
  from tensorpack import tfv1
  from tensorpack import *
  from tensorpack.dataflow import dataset
  from tensorpack.tfutils.summary import *
  from tensorpack.utils.gpu import get_num_gpu
label_desc: Use image node_id 1 for calling a global function with example usage: get_data(train_or_test, cifar_classnum) and returns: ds