code: def get_data(file_name):
      if file_name.endswith(".lmdb"):
          ds = LMDBSerializer.load(file_name, shuffle=True)
          ds = ImageDecode(ds, index=0)
      elif file_name.endswith(".zip"):
          ds = ImageDataFromZIPFile(file_name, shuffle=True)
          ds = ImageDecode(ds, index=0)
          ds = RejectTooSmallImages(ds, index=0)
          ds = CenterSquareResize(ds, index=0)
      else:
          raise ValueError("Unknown file format " + file_name)
      augmentors = [imgaug.RandomCrop(128), imgaug.Flip(horiz=True)]
      ds = AugmentImageComponent(ds, augmentors, index=0, copy=True)
      ds = MapData(
          ds,
          lambda x: [
              cv2.resize(x[0], (32, 32), interpolation=cv2.INTER_CUBIC),
              x[0],
          ],
      )
      ds = MultiProcessRunnerZMQ(ds, 3)
      ds = BatchData(ds, BATCH_SIZE)
      return ds
  
imports: import argparse
  import numpy
  import os
  import cv2
  import six
  import tensorflow
  from tensorpack import *
  from tensorpack.tfutils.scope_utils import auto_reuse_variable_scope
  from tensorpack.tfutils.summary import add_moving_summary
  from tensorpack.utils import logger
  from tensorpack.utils.gpu import get_num_gpu
  from data_sampler import CenterSquareResize, ImageDataFromZIPFile, ImageDecode, RejectTooSmallImages
  from GAN import GANModelDesc, SeparateGANTrainer
label_desc: Use image node_id 4 for calling a global function with example usage: get_data(file_name) and returns: ds