code: def get_data(datadir, isTrain=True):
      if isTrain:
          augs = [
              imgaug.Resize(int(SHAPE * 1.12)),
              imgaug.RandomCrop(SHAPE),
              imgaug.Flip(horiz=True),
          ]
      else:
          augs = [imgaug.Resize(SHAPE)]
  
      def get_image_pairs(dir1, dir2):
          def get_df(dir):
              files = sorted(glob.glob(os.path.join(dir, "*.jpg")))
              df = ImageFromFile(files, channel=3, shuffle=isTrain)
              return AugmentImageComponent(df, augs)
  
          return JoinData([get_df(dir1), get_df(dir2)])
  
      names = ["trainA", "trainB"] if isTrain else ["testA", "testB"]
      df = get_image_pairs(*[os.path.join(datadir, n) for n in names])
      df = BatchData(df, BATCH if isTrain else TEST_BATCH)
      df = MultiProcessRunnerZMQ(df, 2 if isTrain else 1)
      return df
  
imports: import argparse
  import glob
  import os
  import tensorflow
  from six.moves import range
  from tensorpack import *
  from tensorpack.tfutils.scope_utils import auto_reuse_variable_scope
  from tensorpack.tfutils.summary import add_moving_summary
  from GAN import GANModelDesc, GANTrainer
label_desc: Use image node_id 3 for calling a global function with example usage: get_data(datadir, isTrain) and returns: df, JoinData, AugmentImageComponent