code: def sample(datadir, model_path):
      pred = PredictConfig(
          session_init=SmartInit(model_path),
          model=Model(),
          input_names=["input", "output"],
          output_names=["viz"],
      )
  
      imgs = glob.glob(os.path.join(datadir, "*.jpg"))
      ds = ImageFromFile(imgs, channel=3, shuffle=True)
      ds = MapData(ds, split_input)
      ds = AugmentImageComponents(ds, [imgaug.Resize(256)], (0, 1))
      ds = BatchData(ds, 6)
  
      pred = SimpleDatasetPredictor(pred, ds)
      for o in pred.get_result():
          o = o[0][:, :, :, ::-1]
          stack_patches(o, nr_row=3, nr_col=2, viz=True)
  
imports: import argparse
  import functools
  import glob
  import numpy
  import os
  import cv2
  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.gpu import get_num_gpu
  from tensorpack.utils.viz import stack_patches
  from GAN import GANModelDesc, GANTrainer
label_desc: Use image node_id 5 for calling a global function with example usage: sample(datadir, model_path) without return types